From 18449ab0e9754ae04ae2f232449241ac361f3db4 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 8 Mar 2007 00:43:05 +0100 Subject: git-bundle: avoid packing objects which are in the prerequisites When saying something like "--since=1.day.ago" or "--max-count=5", git-bundle finds the boundary commits which are recorded as prerequisites. However, it failed to tell pack-objects _not_ to pack the objects which are in these. Fix that. And add a test for that. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t5510-fetch.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 't') diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index ad589dd0d..ee3f397a9 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -128,4 +128,15 @@ test_expect_success 'unbundle 2' ' test "tip" = "$(git log -1 --pretty=oneline master | cut -b42-)" ' +test_expect_success 'bundle does not prerequisite objects' ' + cd "$D" && + touch file2 && + git add file2 && + git commit -m add.file2 file2 && + git bundle create bundle3 -1 HEAD && + sed "1,4d" < bundle3 > bundle.pack && + git index-pack bundle.pack && + test 4 = $(git verify-pack -v bundle.pack | wc -l) +' + test_done -- cgit v1.2.1