summaryrefslogtreecommitdiff
path: root/t/t1410-reflog.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-03-07 12:47:17 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-03-07 12:47:17 -0800
commit81ca93f1ce1f5e1ab0e88413914f5e9d23816e11 (patch)
tree6d94d28ff3c699d5ba510f991e817214e2dca524 /t/t1410-reflog.sh
parentMerge branch 'ml/maint-grep-doc' (diff)
parentreflog: honor gc.reflogexpire=never (diff)
downloadtgif-81ca93f1ce1f5e1ab0e88413914f5e9d23816e11.tar.xz
Merge branch 'as/maint-expire'
* as/maint-expire: reflog: honor gc.reflogexpire=never prune: honor --expire=never
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-xt/t1410-reflog.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 80af6b9b7e..25046c4208 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -214,4 +214,45 @@ test_expect_success 'delete' '
'
+test_expect_success 'rewind2' '
+
+ test_tick && git reset --hard HEAD~2 &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4
+
+'
+
+test_expect_success '--expire=never' '
+
+ git reflog expire --verbose \
+ --expire=never \
+ --expire-unreachable=never \
+ --all &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4
+
+'
+
+test_expect_success 'gc.reflogexpire=never' '
+
+ git config gc.reflogexpire never &&
+ git config gc.reflogexpireunreachable never &&
+ git reflog expire --verbose --all &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4
+'
+
+test_expect_success 'gc.reflogexpire=false' '
+
+ git config gc.reflogexpire false &&
+ git config gc.reflogexpireunreachable false &&
+ git reflog expire --verbose --all &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4 &&
+
+ git config --unset gc.reflogexpire &&
+ git config --unset gc.reflogexpireunreachable
+
+'
+
test_done