summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d4900ee)
raw | patch | inline | side by side (parent: d4900ee)
author | Junio C Hamano <gitster@pobox.com> | |
Sat, 8 Aug 2009 03:12:13 +0000 (20:12 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 8 Aug 2009 03:42:45 +0000 (20:42 -0700) |
The test ignored the exit status from verify pack command, and also relied
on not seeing any delta chain statistics.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
on not seeing any delta chain statistics.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5510-fetch.sh | patch | blob | history |
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 52094e78dcd63cd7dc1ce166450c403fc32efbac..61a02a91a198d9150cec0692c57c1b5d1a576cf5 100755 (executable)
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
D=`pwd`
+test_bundle_object_count () {
+ git verify-pack -v "$1" >verify.out &&
+ test "$2" = $(grep '^[0-9a-f]\{40\} ' verify.out | wc -l)
+}
+
test_expect_success setup '
echo >file original &&
git add file &&
test_must_fail git fetch "$D/bundle1" master:master
'
+
test_expect_success 'bundle 1 has only 3 files ' '
cd "$D" &&
(
cat
) <bundle1 >bundle.pack &&
git index-pack bundle.pack &&
- verify=$(git verify-pack -v bundle.pack) &&
- test 4 = $(echo "$verify" | wc -l)
+ test_bundle_object_count bundle.pack 3
'
test_expect_success 'unbundle 2' '
cat
) <bundle3 >bundle.pack &&
git index-pack bundle.pack &&
- test 4 = $(git verify-pack -v bundle.pack | wc -l)
+ test_bundle_object_count bundle.pack 3
'
test_expect_success 'bundle should be able to create a full history' '