summaryrefslogtreecommitdiff
path: root/t/t7700-repack.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-05-21 04:02:18 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-05-21 04:02:18 -0700
commita660534e06147f8867d6c9b6c41025427a7b5c6c (patch)
tree0ba8f85b478e0642ee775df82a94c3640217d756 /t/t7700-repack.sh
parentMerge branch 'cw/maint-exec-defpath' (diff)
parentreflog --expire-unreachable: special case entries in "HEAD" reflog (diff)
downloadtgif-a660534e06147f8867d6c9b6c41025427a7b5c6c.tar.xz
Merge branch 'jc/maint-no-reflog-expire-unreach-for-head'
* jc/maint-no-reflog-expire-unreach-for-head: reflog --expire-unreachable: special case entries in "HEAD" reflog more war on "sleep" in tests Document gc.<pattern>.reflogexpire variables Conflicts: Documentation/config.txt
Diffstat (limited to 't/t7700-repack.sh')
-rwxr-xr-xt/t7700-repack.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index f4aa054750..c2f66ff170 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -8,6 +8,7 @@ test_expect_success 'objects in packs marked .keep are not repacked' '
echo content1 > file1 &&
echo content2 > file2 &&
git add . &&
+ test_tick &&
git commit -m initial_commit &&
# Create two packs
# The first pack will contain all of the objects except one
@@ -40,6 +41,7 @@ test_expect_success 'loose objects in alternate ODB are not repacked' '
echo content3 > file3 &&
objsha1=$(GIT_OBJECT_DIRECTORY=alt_objects git hash-object -w file3) &&
git add file3 &&
+ test_tick &&
git commit -m commit_file3 &&
git repack -a -d -l &&
git prune-packed &&
@@ -73,6 +75,7 @@ test_expect_success 'packed obs in alt ODB are repacked when local repo has pack
rm -f .git/objects/pack/* &&
echo new_content >> file1 &&
git add file1 &&
+ test_tick &&
git commit -m more_content &&
git repack &&
git repack -a -d &&
@@ -118,8 +121,8 @@ test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '
mv .git/objects/pack/* alt_objects/pack/ &&
csha1=$(git rev-parse HEAD^{commit}) &&
git reset --hard HEAD^ &&
- sleep 1 &&
- git reflog expire --expire=now --expire-unreachable=now --all &&
+ test_tick &&
+ git reflog expire --expire=$test_tick --expire-unreachable=$test_tick --all &&
# The pack-objects call on the next line is equivalent to
# git repack -A -d without the call to prune-packed
git pack-objects --honor-pack-keep --non-empty --all --reflog \
@@ -156,7 +159,7 @@ test_expect_success 'objects made unreachable by grafts only are kept' '
H1=$(git rev-parse HEAD^) &&
H2=$(git rev-parse HEAD^^) &&
echo "$H0 $H2" > .git/info/grafts &&
- git reflog expire --expire=now --expire-unreachable=now --all &&
+ git reflog expire --expire=$test_tick --expire-unreachable=$test_tick --all &&
git repack -a -d &&
git cat-file -t $H1
'