summaryrefslogtreecommitdiff
path: root/t/t5304-prune.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/t5304-prune.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/t5304-prune.sh')
-rwxr-xr-xt/t5304-prune.sh32
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 &&