diff options
Diffstat (limited to 't/t6500-gc.sh')
-rwxr-xr-x | t/t6500-gc.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh index 82f3639937..5d7d414617 100755 --- a/t/t6500-gc.sh +++ b/t/t6500-gc.sh @@ -9,9 +9,14 @@ test_expect_success 'gc empty repository' ' git gc ' +test_expect_success 'gc does not leave behind pid file' ' + git gc && + test_path_is_missing .git/gc.pid +' + test_expect_success 'gc --gobbledegook' ' test_expect_code 129 git gc --nonsense 2>err && - grep "[Uu]sage: git gc" err + test_i18ngrep "[Uu]sage: git gc" err ' test_expect_success 'gc -h with invalid configuration' ' @@ -22,7 +27,20 @@ test_expect_success 'gc -h with invalid configuration' ' echo "[gc] pruneexpire = CORRUPT" >>.git/config && test_expect_code 129 git gc -h >usage 2>&1 ) && - grep "[Uu]sage" broken/usage + test_i18ngrep "[Uu]sage" broken/usage +' + +test_expect_success 'gc is not aborted due to a stale symref' ' + git init remote && + ( + cd remote && + test_commit initial && + git clone . ../client && + git branch -m develop && + cd ../client && + git fetch --prune && + git gc + ) ' test_done |