From: Junio C Hamano <gitster@pobox•com>
To: Michael Haggerty <mhagger@alum•mit.edu>
Cc: Stefan Beller <sbeller@google•com>, git@vger•kernel.org
Subject: Re: [PATCH 3/3] refs.c: remove lock_fd from struct ref_lock
Date: Wed, 15 Apr 2015 11:35:06 -0700 [thread overview]
Message-ID: <xmqqbnipkzol.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <552E2608.7020104@alum.mit.edu> (Michael Haggerty's message of "Wed, 15 Apr 2015 10:49:12 +0200")
Michael Haggerty <mhagger@alum•mit.edu> writes:
> This whole series LGTM; however, I suggest that this patch be split up.
> See below.
>
>> Signed-off-by: Stefan Beller <sbeller@google•com>
>> Signed-off-by: Junio C Hamano <gitster@pobox•com>
>> ---
>> refs.c | 16 ++++++----------
>> 1 file changed, 6 insertions(+), 10 deletions(-)
>>
>> diff --git a/refs.c b/refs.c
>> index 14e52ca..4066752 100644
>> --- a/refs.c
>> +++ b/refs.c
>> [...]
>> @@ -2335,8 +2333,8 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
>> goto error_return;
>> }
>>
>> - lock->lock_fd = hold_lock_file_for_update(lock->lk, ref_file, lflags);
>> - if (lock->lock_fd < 0) {
>> + if (hold_lock_file_for_update(lock->lk, ref_file, lflags) < 0) {
>> + last_errno = errno;
>> if (errno == ENOENT && --attempts_remaining > 0)
>> /*
>> * Maybe somebody just deleted one of the
>> [...]
>
> Here you add the line "last_errno = errno". It is a good change, but it
> is not part of removing ref_lock::lock_fd.
I think this patch came from an ancient codebase before 06839515
(lock_ref_sha1_basic: do not die on locking errors, 2014-11-19),
which added the "last_errno = errno", and was not rebased to match
more recent codebase.
I am planning to apply these on top of v2.4.0-rc, so there will be
no new "save to last_errno" in the end.
Thanks.
prev parent reply other threads:[~2015-04-15 18:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 22:25 [PATCH 0/3] Large transactions in git Stefan Beller
2015-04-14 22:25 ` [PATCH 1/3] update-ref: test handling large transactions properly Stefan Beller
2015-04-14 22:25 ` [PATCH 2/3] t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE Stefan Beller
2015-04-14 22:25 ` [PATCH 3/3] refs.c: remove lock_fd from struct ref_lock Stefan Beller
2015-04-14 23:12 ` Junio C Hamano
2015-04-15 8:49 ` Michael Haggerty
2015-04-15 18:35 ` Junio C Hamano [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=xmqqbnipkzol.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=mhagger@alum$(echo .)mit.edu \
--cc=sbeller@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox