diff options
author | Adam Simpkins <simpkins@facebook.com> | 2010-02-26 19:50:03 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-28 10:28:26 -0800 |
commit | 4a9f439415eda734914c7328a2326ee9590246ee (patch) | |
tree | 4687541ac71913788e36c6b1870ce78bb962dd91 /t/t1410-reflog.sh | |
parent | cbf731ed4ec511f2c32598e03d7865f35881fea2 (diff) | |
download | git-4a9f439415eda734914c7328a2326ee9590246ee.tar.gz |
reflog: honor gc.reflogexpire=never
Previously, if gc.reflogexpire or gc.reflogexpire were set to "never"
or "false", the builtin default values were used instead.
Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-x | t/t1410-reflog.sh | 41 |
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 |