Skip to content
This repository
tree: da53e27e94
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 29 lines (22 sloc) 0.499 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/bin/sh

test_description='basic git gc tests
'

. ./test-lib.sh

test_expect_success 'gc empty repository' '
git gc
'

test_expect_success 'gc --gobbledegook' '
test_expect_code 129 git gc --nonsense 2>err &&
grep "[Uu]sage: git gc" err
'

test_expect_success 'gc -h with invalid configuration' '
mkdir broken &&
(
cd broken &&
git init &&
echo "[gc] pruneexpire = CORRUPT" >>.git/config &&
test_expect_code 129 git gc -h >usage 2>&1
) &&
grep "[Uu]sage" broken/usage
'

test_done
Something went wrong with that request. Please try again.