From: Paolo Bonzini <bonzini@gnu.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] rollback index if git-commit is interrupted by a signal
Date: Thu, 29 May 2008 16:35:11 +0200 [thread overview]
Message-ID: <483EBF1F.9000809@gnu.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0805291456030.13507@racer.site.net>
>> Without this change, there could be races between the time the lock file
>> is created and the time the commit_style variable is set, leading to the
>> rollback not being performed.
>
> IMO it would make much more sense to _guarantee_ that the commity_style
> variable is set before the index is locked. It is feasible, and there is
> no good reason not to do that.
No, it's not possible because the COMMIT_PARTIAL case first creates the
index_lock and then the false_lock. It would be curious at least to set
the commit_style to COMMIT_NORMAL after creating the index_lock, and
upgrade it to COMMIT_PARTIAL later on. I contemplated that, and my
patch is the simplest code that's needed and works.
Paolo
next prev parent reply other threads:[~2008-05-29 14:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 8:03 [PATCH] rollback index if git-commit is interrupted by a signal Paolo Bonzini
2008-05-29 12:42 ` Johannes Schindelin
2008-05-29 13:19 ` Paolo Bonzini
2008-05-29 14:03 ` Johannes Schindelin
2008-05-29 14:35 ` Paolo Bonzini [this message]
2008-05-29 14:42 ` Johannes Schindelin
2008-05-29 14:55 ` [PATCH v2] rollback lock files on more signals than just SIGINT Paolo Bonzini
2008-06-04 11:40 ` Mike Ralphson
2008-06-04 17:29 ` Junio C Hamano
2008-06-05 8:02 ` Mike Ralphson
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=483EBF1F.9000809@gnu.org \
--to=bonzini@gnu.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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.