-
Notifications
You must be signed in to change notification settings - Fork 61
Prompt to reuse or ignore an existing GIT_HUB_MSG_FILE #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e5d5856 to
418c26e
Compare
|
Implemented the missing todos. |
418c26e to
d5fa99c
Compare
|
sweet! |
|
:D |
|
btw: it will ignore old msg files, so when users upgrade, they won't get prompted because of old files from successful commands. |
|
Is there a way to detect and delete the old ones? |
|
I think it's not necessary to delete them. |
|
another thing: when prompted, you can enter a, r or d. if the user enters something else, what should be done? abort? |
delete comment lines from previous GIT_HUB_MSG_FILE show date of GIT_HUB_MSG_FILE only remove GIT_HUB_MSG_FILE when editor command was used delete empty GIT_HUB_MSG_FILE write new content into GIT_HUB_MSG_FILE in case of an old file abort if user does not enter 'r' or 'd'
1af1ecb to
715403d
Compare
|
You were right, the old content was shown when there was an old squashed commits |
|
Here is a test where I entered The date failure is likely OSX specific. There are some OSX specific parts in The command has an extra space at the end. I'd like the prompt message to be: Where 'show' runs something like And new opens a new message without deleting the old GIT_HUB_EDIT_MSG. |
TODO:
|
f7edf2e to
3ec8eb9
Compare
add possibility to show msg file and prompt again after that
3ec8eb9 to
04a7b9c
Compare
|
fixed the trailing whitespace |
|
Regarding choosing "new": I'd rather have the option to (s)ave the old file somewhere else, but this must be a unique filename in case this happens more than once. Like |
508f129 to
4cae997
Compare
|
I added an OSX specific command for getting the date of the file. |
|
Applied. Pushed. Thanks! |
|
Skipping (n)ew option or saveas for now. |
This needs a bit more work.
See issue #28
After a successful command, delete GIT_HUB_MSG_FILE.
When starting editor and file exists, prompt for reusing, deleting
or aborting.
Still todo:
the editor, so a non-editor-command wouldn't destroy an old file.