aboutsummaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-07 20:44:09 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-07 20:44:09 -0700
commite72263a1f88d39a7e3672bbe15a7524f8a3f520a (patch)
treeb9ef9e35b3abd04e7fefa4d2bc16358755d2b486 /t/t5510-fetch.sh
parentcd12f536129357d5347c1953db69bde68b5f46c9 (diff)
parent0d5055665ca1e76659ffa96bf972b4b0125ea069 (diff)
downloadgit-e72263a1f88d39a7e3672bbe15a7524f8a3f520a.tar.gz
git-e72263a1f88d39a7e3672bbe15a7524f8a3f520a.tar.xz
Merge branch 'maint-1.6.1' into maint-1.6.2
* maint-1.6.1: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index bee3424fe..d13c80662 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -9,6 +9,11 @@ test_description='Per branch config variables affects "git fetch".
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 &&
@@ -146,6 +151,7 @@ test_expect_success 'unbundle 1' '
test_must_fail git fetch "$D/bundle1" master:master
'
+
test_expect_success 'bundle 1 has only 3 files ' '
cd "$D" &&
(
@@ -156,8 +162,7 @@ test_expect_success 'bundle 1 has only 3 files ' '
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' '
@@ -180,7 +185,7 @@ test_expect_success 'bundle does not prerequisite objects' '
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' '