@@ -132,6 +132,8 @@ test_expect_success 'commit succeeds' \
132132
133133test_expect_success ' recorded postimage' " test -f $rr /postimage"
134134
135+ oldmtimepost=$( test-chmtime -v -60 $rr /postimage | cut -f 1)
136+
135137test_expect_success ' another conflicting merge' '
136138 git checkout -b third master &&
137139 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"
144146
145147test_expect_success ' rerere prefers first change' ' test_cmp a1 expect'
146148
149+ test_expect_success ' rerere updates postimage timestamp' '
150+ newmtimepost=$(test-chmtime -v +0 $rr/postimage |cut -f 1) &&
151+ test $oldmtimepost -lt $newmtimepost
152+ '
153+
147154rm $rr /postimage
148155echo " $sha1 a1" | perl -pe ' y/\012/\000/' > .git/MERGE_RR
149156
@@ -165,15 +172,16 @@ just_over_15_days_ago=$((-1-15*86400))
165172almost_60_days_ago=$(( 60 - 60 * 86400 ))
166173just_over_60_days_ago=$(( - 1 - 60 * 86400 ))
167174
168- test-chmtime =$almost_60_days_ago $rr /preimage
175+ test-chmtime =$just_over_60_days_ago $rr /preimage
176+ test-chmtime =$almost_60_days_ago $rr /postimage
169177test-chmtime =$almost_15_days_ago $rr2 /preimage
170178
171179test_expect_success ' garbage collection (part1)' ' git rerere gc'
172180
173- test_expect_success ' young records still live' \
181+ test_expect_success ' young or recently used records still live' \
174182 " test -f $rr /preimage && test -f $rr2 /preimage"
175183
176- test-chmtime =$just_over_60_days_ago $rr /preimage
184+ test-chmtime =$just_over_60_days_ago $rr /postimage
177185test-chmtime =$just_over_15_days_ago $rr2 /preimage
178186
179187test_expect_success ' garbage collection (part2)' ' git rerere gc'
0 commit comments