diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index a4fbfda467602a196c4e39c099720f540ae76cd1..f0c7e22b36c66234e2a46bac659506afb454dfa7 100755 (executable)
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
'
. ./test-lib.sh
'
. ./test-lib.sh
+echo '[core] logallrefupdates = true' >>.git/config
+
test_expect_success \
'prepare a trivial repository' \
'echo Hello > A &&
test_expect_success \
'prepare a trivial repository' \
'echo Hello > A &&
'see if a branch still exists when packed' \
'git-branch b &&
git-pack-refs --all &&
'see if a branch still exists when packed' \
'git-branch b &&
git-pack-refs --all &&
- rm .git/refs/heads/b &&
+ rm -f .git/refs/heads/b &&
echo "$SHA1 refs/heads/b" >expect &&
git-show-ref b >result &&
diff expect result'
echo "$SHA1 refs/heads/b" >expect &&
git-show-ref b >result &&
diff expect result'
git-branch -d n/o/p &&
git-branch n'
git-branch -d n/o/p &&
git-branch n'
+test_expect_success 'pack, prune and repack' '
+ git-tag foo &&
+ git-pack-refs --all --prune &&
+ git-show-ref >all-of-them &&
+ git-pack-refs &&
+ git-show-ref >again &&
+ diff all-of-them again
+'
+
test_done
test_done