aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-01-25 16:51:21 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-25 19:16:07 -0800
commit1b555932cdb7f75239623573cd2ff25fa98ab4e4 (patch)
tree3cd342e77ecef95266e8bba684b5931ffbe9cd29 /t
parent535514f1f3cd32dfe2cb4c70e97b41ea868d1134 (diff)
downloadgit-1b555932cdb7f75239623573cd2ff25fa98ab4e4.tar.gz
git-1b555932cdb7f75239623573cd2ff25fa98ab4e4.tar.xz
Fix seriously broken "git pack-refs"
Do *NOT* try this on a repository you care about: git pack-refs --all --prune git pack-refs because while the first "pack-refs" does the right thing, the second pack-refs will totally screw you over. This is because the second one tries to pack only tags; we should also pack what are already packed -- otherwise we would lose them. [jc: with an additional test] Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t3210-pack-refs.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index 16bdae4f2..f0c7e22b3 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -96,4 +96,13 @@ test_expect_success \
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