Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: 26e5c5d09334d157bd04f794f16f6e338d50c752 authored by Junio C Hamano on 25 May 2012, 18:28:43 UTC
Git 1.7.10.3
Tip revision: 26e5c5d
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