Revision 27547e5fccda134560ad0441aa5bfa187387cec0 authored by Junio C Hamano on 16 April 2015, 17:48:58 UTC, committed by Junio C Hamano on 16 April 2015, 18:35:38 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 599446d
Raw File
t5527-fetch-odd-refs.sh
#!/bin/sh

test_description='test fetching of oddly-named refs'
. ./test-lib.sh

# afterwards we will have:
#  HEAD - two
#  refs/for/refs/heads/master - one
#  refs/heads/master - three
test_expect_success 'setup repo with odd suffix ref' '
	echo content >file &&
	git add . &&
	git commit -m one &&
	git update-ref refs/for/refs/heads/master HEAD &&
	echo content >>file &&
	git commit -a -m two &&
	echo content >>file &&
	git commit -a -m three &&
	git checkout HEAD^
'

test_expect_success 'suffix ref is ignored during fetch' '
	git clone --bare file://"$PWD" suffix &&
	echo three >expect &&
	git --git-dir=suffix log -1 --format=%s refs/heads/master >actual &&
	test_cmp expect actual
'

test_done
back to top