All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] make commit --interactive lock index
Date: Mon, 02 Jun 2008 15:52:11 +0200	[thread overview]
Message-ID: <4843FB0B.60607@gnu.org> (raw)
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

      parent reply	other threads:[~2008-06-02 13:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29  8:09 [PATCH] make commit --interactive lock index Paolo Bonzini
2008-05-29 12:43 ` Johannes Schindelin
2008-05-29 13:12   ` Paolo Bonzini
2008-05-29 13:55     ` Johannes Schindelin
2008-05-29 14:40       ` Paolo Bonzini
2008-05-29 17:51         ` Alex Riesen
2008-05-29 18:00           ` Paolo Bonzini
2008-05-29 18:56             ` Alex Riesen
2008-05-29 19:17               ` Paolo Bonzini
2008-05-30  5:29 ` Junio C Hamano
2008-05-30  7:42   ` Paolo Bonzini
2008-06-02 13:52   ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4843FB0B.60607@gnu.org \
    --to=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.