Re: Aborting "git commit --interactive" discards updates to index
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 9, 2012, 00:41 UTC
- Message-ID
- <7v62glg118.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CANgJU+WGEBMMQzsGyQSnMBK3Q8Z2XZdbDx4nr-tB-s0uYEU9CQ@mail.gmail.com>
demerphq <demerphq@gmail.com> writes:
Show 9 quoted lines
> On 7 January 2012 06:08, Junio C Hamano <gitster@pobox.com> wrote: > ... >> You are welcome to rehash the age old discussion, though. Personally I do >> not care very deeply either way. I would never use "commit --interactive" >> myself, and I would not encourage others to use it, either, even if we do >> not worry about the behaviour when a commit is aborted. > > If I were to provide a patch to make this behavior configurable would > you have any objections?
You are welcome to rehash the discussion.
I am not a dictator and will listen to other people on the list for their opinions, and I cannot say if such a patch will be accepted or not without seeing how well it is done.
Show 6 quoted lines
>> ... off to run "git add -i" to prepare the index, "git stash save -k" to check >> out what is to be committed (and stash away what are to be left out) so >> that you can make sure what you are committing is what you thought are >> committing (by asking "git diff" and "make test" for example), and after > > Isnt this what the diff option in commit interactive is for?
Not at all.
That is to help the user incrementally in the process and not a replacement for the final eyeballing of the result.
Neither the patch shown in "commit -v", whose primary purpose is to aid the user to write a better log message.