Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: 740a8fc2249cf7d8b39ab50a25bbf86554158ae7 authored by Junio C Hamano on 12 September 2011, 17:33:03 UTC
Git 1.7.6.3
Tip revision: 740a8fc
t6500-gc.sh
#!/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
back to top