Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: f3f778df6900881a7bac409c927931c32b82bcb5 authored by Junio C Hamano on 28 December 2011, 19:49:09 UTC
Git 1.7.8.2
Tip revision: f3f778d
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