git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: demerphq
Message 4 of 4 in “Aborting "git commit --interactive" discards updates to index (was: Re: [ANNOUNCE] Git 1.7.6)”
  1. demerphqJan 6, 2012
  2. Junio C HamanoJan 7, 2012
  3. demerphqJan 7, 2012
  4. Junio C HamanoJan 9, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.