Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: d8cf053dacb4f78920c112d10c7be21e4f5a5817 authored by Junio C Hamano on 30 September 2012, 05:33:25 UTC
Git 1.7.12.2
Tip revision: d8cf053
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