From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathon Mah <me@jonathonmah.com>, git@vger.kernel.org
Subject: Re: [PATCHv4] sha1_file: fix iterating loose alternate objects
Date: Mon, 2 Feb 2015 15:02:58 -0500 [thread overview]
Message-ID: <20150202200258.GA28915@peff.net> (raw)
In-Reply-To: <xmqqk300t772.fsf@gitster.dls.corp.google.com>
On Mon, Feb 02, 2015 at 12:00:17PM -0800, Junio C Hamano wrote:
> Jonathon Mah <me@jonathonmah.com> writes:
>
> > +test_expect_success 'prune: handle alternate object database' '
> > + test_create_repo A &&
> > + (cd A &&
> > + echo "Hello World" >file1 &&
> > + git add file1 &&
> > + git commit -m "Initial commit" file1) &&
> > + git clone -s A B &&
> > + (cd B &&
> > + echo "foo bar" >file2 &&
> > + git add file2 &&
> > + git commit -m "next commit" file2 &&
> > + git prune)
> > +'
>
> The issue does not have much to do with introducing new path to the
> cloned repository, or the original having any specific content for
> that matter, so I am tempted to simplify the above to something like
> this intead:
>
> test_create_repo A &&
> git -C A commit --allow-empty -m "initial commit" &&
> git clone --shared A B &&
> git -C B commit --allow-empty -m "next commit" &&
> git -C B prune
Yeah, I'd agree that more clearly demonstrates the issue (I didn't check
that it actually triggers the failure, but presumably you did).
I think we could also construct a more elaborate example where we fail
to pick up an unreachable segment of history based on the mtime of a tip
commit found only in the alternate (whereas this is only testing that we
don't bungle the alternate filename so completely that prune barfs).
-Peff
prev parent reply other threads:[~2015-02-02 20:03 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
2015-02-02 20:00 ` Junio C Hamano
2015-02-02 20:02 ` Jeff King [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=20150202200258.GA28915@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@jonathonmah.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.