Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: 4d06473928ee574910accbde05c19ef2263abdf6 authored by Junio C Hamano on 19 August 2013, 17:34:14 UTC
Git 1.8.4-rc4
Tip revision: 4d06473
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 &&
	test_i18ngrep "[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
	) &&
	test_i18ngrep "[Uu]sage" broken/usage
'

test_done
back to top