Re: [PATCH 03/10] pack-objects: test for --partial-by-size --partial-special
- From
Jeff King <peff@peff.net>
- Date
- Mar 9, 2017, 07:35 UTC
- Message-ID
- <20170309073516.rksys3jljadupxtc@sigill.intra.peff.net>
- In-Reply-To
- <1488994685-37403-4-git-send-email-jeffhost@microsoft.com>
On Wed, Mar 08, 2017 at 05:37:58PM +0000, Jeff Hostetler wrote:
Show 10 quoted lines
> diff --git a/t/5316-pack-objects-partial.sh b/t/5316-pack-objects-partial.sh > [...] > +test_expect_success 'setup' ' > + perl -e "print \"a\" x 11;" > a && > + perl -e "print \"a\" x 1100;" > b && > + perl -e "print \"a\" x 1100000;" > c && > + echo "ignored" > .gitignore && > + git add a b c .gitignore && > + git commit -m test > + '
A few minor style nits. We usually prefer ">a" with no space, and the closing single-quote isn't indented.
Show 8 quoted lines
> +test_expect_success 'special' ' > + git pack-objects --revs --thin --stdout --partial-special >spec.pack <<-EOF && > + master > + > + EOF > + git index-pack spec.pack && > + test 1 = $(git verify-pack -v spec.pack | grep blob | wc -l) > + '
All of the tests make sense to me except this one. I see from the code in pack-objects why this returns only the .gitattributes file. I'm just not clear on whether that would ever be useful. I guess it lets you ask "give me only the special files", but again, that seems kind of weird if you are not otherwise limiting.
-Peff