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

Re: [PATCH] make commit --interactive lock index

From
Paolo Bonzini <bonzini@gnu.org>
Date
Jun 2, 2008, 13:52 UTC
Message-ID
<4843FB0B.60607@gnu.org>
In-Reply-To
<7vr6bkmkbm.fsf@gitster.siamese.dyndns.org>
> If your change were so that "git commit --interactive" reverts the index
> when one of the hooks exited non-zero just like COMMIT_NORMAL case (as
> opposed to the current code which does not revert the index), I would
> understand the need to change what's inside "if (interactive)" block.
So why does the COMMIT_AS_IS path need to lock?  The comment is not clear:
          * The caller should run hooks on the real index, and run
          * hooks on the real index, and create commit from the_index.
          * We still need to refresh the index here.

It seems to me that the lock+refresh+write+commit done by plain "git commit" is useless too, since it also runs in the case "pathspec && *pathspec".

I guess the patch should be withdrawn, and so I didn't want to follow up anymore, but the weird comment made me change my mind...

(The other patch I sent -- which is at http://permalink.gmane.org/gmane.comp.version-control.git/83209 -- is not withdrawn and not related to this one).

Paolo
Previous: Paolo Bonzini
Message 12 of 12 in “make commit --interactive lock index”
  1. make commit --interactive lock indexPaolo Bonzini, May 29, 2008
  2. Johannes SchindelinMay 29, 2008
  3. Paolo BonziniMay 29, 2008
  4. Johannes SchindelinMay 29, 2008
  5. Paolo BonziniMay 29, 2008
  6. Alex RiesenMay 29, 2008
  7. Paolo BonziniMay 29, 2008
  8. Alex RiesenMay 29, 2008
  9. Paolo BonziniMay 29, 2008
  10. Junio C HamanoMay 30, 2008
  11. Paolo BonziniMay 30, 2008
  12. Paolo BonziniJun 2, 2008

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.