Re: [PATCH] fetch-pack: don't try to fetch peeled values with --all
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 11, 2018, 05:28 UTC
- Message-ID
- <CAPig+cT73d0rYoSbt7oHVG4MYHVvjKidP0ogRwV+9F73jcjZEA@mail.gmail.com>
- In-Reply-To
- <20180611044710.GB31642@sigill.intra.peff.net>
On Mon, Jun 11, 2018 at 12:47 AM, Jeff King <peff@peff.net> wrote:
Show 13 quoted lines
> Subject: fetch-pack: don't try to fetch peeled values with --all > [...] > Original report and test from Kirill Smelkov. > > Signed-off-by: Kirill Smelkov <kirr@nexedi.com> > Signed-off-by: Jeff King <peff@peff.net> > --- > diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh > @@ -506,30 +506,45 @@ test_expect_success 'test missing ref before existing' ' > +test_expect_success 'test --all wrt tag to non-commits' ' > + blob_sha1=$(echo "hello blob" | git hash-object -t blob -w --stdin) && > + git tag -a -m "tag -> blob" tag-to-blob $blob_sha1 && > + tree_sha1=$(printf "100644 blob $blob_sha1\tfile\n" | git mktree) &&
Perhaps modernize these names to 'blob_oid' and 'tree_oid', or even simpler, just 'blob' and 'tree'.
Show 6 quoted lines
> + git tag -a -m "tag -> tree" tag-to-tree $tree_sha1 && > + mkdir fetchall && > + ( > + cd fetchall && > + git init && > + git fetch-pack --all .. &&
Simpler:
git init fetchall &&
(
cd fetchall &&
git fetch-pack --all .. &&Although, I see that this script already has a mix of the two styles (simpler and not-so-simple), so...
> + git cat-file blob $blob_sha1 >/dev/null && > + git cat-file tree $tree_sha1 >/dev/null > + ) > +'