Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2019-03-28 19:14:33 +0300
committerJunio C Hamano <gitster@pobox.com>2019-04-01 06:51:51 +0300
commit978f4307638917127704716b754aed0953452bf4 (patch)
tree3d1bbd80b5b66f4cc5c0023e247b2890475b63f1 /t/t1410-reflog.sh
parentfe66776db0b841d4d4cf64f078e1ffd82193442a (diff)
reflog tests: assert lack of early exit with expiry="never"
When gc.reflogExpire and gc.reflogExpireUnreachable are set to "never" and --stale-fix isn't in effect we *could* exit early without pointlessly looping over all the reflogs. However, as an earlier change to add a test for the "points nowhere" warning shows even in such a mode we might want to print out a warning. So while it's conceivable to implement this, I don't think it's worth it. It's going to be too easy to inadvertently add some flag that'll make the expiry happen anyway, and even with "never" we'd like to see all the lines we're going to keep. So let's assert that we're going to loop over all the references even when this configuration is in effect. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-xt/t1410-reflog.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index e8f8ac9785..79f731db37 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -235,7 +235,9 @@ test_expect_success 'gc.reflogexpire=never' '
test_config gc.reflogexpire never &&
test_config gc.reflogexpireunreachable never &&
- git reflog expire --verbose --all &&
+ git reflog expire --verbose --all >output &&
+ test_line_count = 9 output &&
+
git reflog refs/heads/master >output &&
test_line_count = 4 output
'