diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-07 12:47:17 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-07 12:47:17 -0800 |
commit | 81ca93f1ce1f5e1ab0e88413914f5e9d23816e11 (patch) | |
tree | 6d94d28ff3c699d5ba510f991e817214e2dca524 /t/t5304-prune.sh | |
parent | Merge branch 'ml/maint-grep-doc' (diff) | |
parent | reflog: honor gc.reflogexpire=never (diff) | |
download | tgif-81ca93f1ce1f5e1ab0e88413914f5e9d23816e11.tar.xz |
Merge branch 'as/maint-expire'
* as/maint-expire:
reflog: honor gc.reflogexpire=never
prune: honor --expire=never
Diffstat (limited to 't/t5304-prune.sh')
-rwxr-xr-x | t/t5304-prune.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh index 3c6687abec..e2ed13dba2 100755 --- a/t/t5304-prune.sh +++ b/t/t5304-prune.sh @@ -148,6 +148,38 @@ test_expect_success 'gc --prune=<date>' ' ' +test_expect_success 'gc --prune=never' ' + + add_blob && + git gc --prune=never && + test -f $BLOB_FILE && + git gc --prune=now && + test ! -f $BLOB_FILE + +' + +test_expect_success 'gc respects gc.pruneExpire=never' ' + + git config gc.pruneExpire never && + add_blob && + git gc && + test -f $BLOB_FILE && + git config gc.pruneExpire now && + git gc && + test ! -f $BLOB_FILE + +' + +test_expect_success 'prune --expire=never' ' + + add_blob && + git prune --expire=never && + test -f $BLOB_FILE && + git prune && + test ! -f $BLOB_FILE + +' + test_expect_success 'gc: prune old objects after local clone' ' add_blob && test-chmtime =-$((2*$week+1)) $BLOB_FILE && |