Merge branch 'maint'
[git/jrn.git] / t / t6500-gc.sh
blob82f363993712d2c0de44de6285f956b46e1ceaf2
1 #!/bin/sh
3 test_description='basic git gc tests
6 . ./test-lib.sh
8 test_expect_success 'gc empty repository' '
9 git gc
12 test_expect_success 'gc --gobbledegook' '
13 test_expect_code 129 git gc --nonsense 2>err &&
14 grep "[Uu]sage: git gc" err
17 test_expect_success 'gc -h with invalid configuration' '
18 mkdir broken &&
20 cd broken &&
21 git init &&
22 echo "[gc] pruneexpire = CORRUPT" >>.git/config &&
23 test_expect_code 129 git gc -h >usage 2>&1
24 ) &&
25 grep "[Uu]sage" broken/usage
28 test_done