From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Jonathon Mah <me@jonathonmah.com>, git@vger.kernel.org
Subject: Re: [PATCHv4] sha1_file: fix iterating loose alternate objects
Date: Mon, 02 Feb 2015 11:35:58 -0800 [thread overview]
Message-ID: <xmqqoapct8bl.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150202185049.GA27399@peff.net> (Jeff King's message of "Mon, 2 Feb 2015 13:50:49 -0500")
Jeff King <peff@peff.net> writes:
> On Mon, Feb 02, 2015 at 10:48:12AM -0800, Jonathon Mah wrote:
>
>> The string in 'base' contains a path suffix to a specific object; when
>> its value is used, the suffix must either be filled (as in
>> stat_sha1_file, open_sha1_file, check_and_freshen_nonlocal) or cleared
>> (as in prepare_packed_git) to avoid junk at the end. loose_from_alt_odb
>> (introduced in 660c889e46d185dc98ba78963528826728b0a55d) did neither and
>> treated 'base' as a complete path to the "base" object directory,
>> instead of a pointer to the "base" of the full path string.
>>
>> The trailing path after 'base' is still initialized to NUL, hiding the
>> bug in some common cases. Additionally the descendent
>> for_each_file_in_obj_subdir function swallows ENOENT, so an error only
>> shows if the alternate's path was last filled with a valid object
>> (where statting /path/to/existing/00/0bjectfile/00 fails).
>>
>> Signed-off-by: Jonathon Mah <me@JonathonMah.com>
>> ---
>> Squashed test and fix.
>
> Thanks, this version looks good to me.
Thanks, both of you.
The analysis, the fix and the test all look reasonable.
next prev parent reply other threads:[~2015-02-02 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 18:48 [PATCHv4] sha1_file: fix iterating loose alternate objects Jonathon Mah
2015-02-02 18:50 ` Jeff King
2015-02-02 19:35 ` Junio C Hamano [this message]
2015-02-02 20:00 ` Junio C Hamano
2015-02-02 20:02 ` Jeff King
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=xmqqoapct8bl.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=me@jonathonmah.com \
--cc=peff@peff.net \
/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.