diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-01 13:57:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-01 13:57:23 -0700 |
commit | c7f649a794250ca680569bd8c2466af42acb434a (patch) | |
tree | 25e2df69993bb180b1785cb2577cc2cc2ca62ca7 /t | |
parent | e4f8fce5c18c9544d3f1a07929fc14e7cbddbcc3 (diff) | |
parent | 7d7ff15b39abfa9e73b6475f189006a74dc26376 (diff) | |
download | git-c7f649a794250ca680569bd8c2466af42acb434a.tar.gz git-c7f649a794250ca680569bd8c2466af42acb434a.tar.xz |
Merge branch 'sg/rerere-gc-old-still-used' into maint
* sg/rerere-gc-old-still-used:
rerere: fix overeager gc
mingw_utime(): handle NULL times parameter
Diffstat (limited to 't')
-rwxr-xr-x | t/t4200-rerere.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh index 70856d07e..093b13891 100755 --- a/t/t4200-rerere.sh +++ b/t/t4200-rerere.sh @@ -132,6 +132,8 @@ test_expect_success 'commit succeeds' \ test_expect_success 'recorded postimage' "test -f $rr/postimage" +oldmtimepost=$(test-chmtime -v -60 $rr/postimage |cut -f 1) + test_expect_success 'another conflicting merge' ' git checkout -b third master && git show second^:a1 | sed "s/To die: t/To die! T/" > a1 && @@ -144,6 +146,11 @@ test_expect_success 'rerere kicked in' "! grep ^=======$ a1" test_expect_success 'rerere prefers first change' 'test_cmp a1 expect' +test_expect_success 'rerere updates postimage timestamp' ' + newmtimepost=$(test-chmtime -v +0 $rr/postimage |cut -f 1) && + test $oldmtimepost -lt $newmtimepost +' + rm $rr/postimage echo "$sha1 a1" | perl -pe 'y/\012/\000/' > .git/MERGE_RR @@ -165,15 +172,16 @@ just_over_15_days_ago=$((-1-15*86400)) almost_60_days_ago=$((60-60*86400)) just_over_60_days_ago=$((-1-60*86400)) -test-chmtime =$almost_60_days_ago $rr/preimage +test-chmtime =$just_over_60_days_ago $rr/preimage +test-chmtime =$almost_60_days_ago $rr/postimage test-chmtime =$almost_15_days_ago $rr2/preimage test_expect_success 'garbage collection (part1)' 'git rerere gc' -test_expect_success 'young records still live' \ +test_expect_success 'young or recently used records still live' \ "test -f $rr/preimage && test -f $rr2/preimage" -test-chmtime =$just_over_60_days_ago $rr/preimage +test-chmtime =$just_over_60_days_ago $rr/postimage test-chmtime =$just_over_15_days_ago $rr2/preimage test_expect_success 'garbage collection (part2)' 'git rerere gc' |