Revision 532b74b2104bd00cbaa99e726e6a7b8997f48744 authored by Junio C Hamano on 13 March 2009, 04:46:50 UTC, committed by Junio C Hamano on 13 March 2009, 04:46:50 UTC
* js/maint-1.6.1-filter-branch-submodule:
  filter-branch: do not consider diverging submodules a 'dirty worktree'
2 parent s c26901a + 26be15f
Raw File
t7103-reset-bare.sh
#!/bin/sh

test_description='git reset in a bare repository'
. ./test-lib.sh

test_expect_success 'setup non-bare' '
	echo one >file &&
	git add file &&
	git commit -m one &&
	echo two >file &&
	git commit -a -m two
'

test_expect_success 'setup bare' '
	git clone --bare . bare.git &&
	cd bare.git
'

test_expect_success 'hard reset is not allowed' '
	test_must_fail  git reset --hard HEAD^
'

test_expect_success 'soft reset is allowed' '
	git reset --soft HEAD^ &&
	test "`git show --pretty=format:%s | head -n 1`" = "one"
'

test_done
back to top