Merge branch 'jk/fetch-no-tail-match-refs'

* jk/fetch-no-tail-match-refs:
  connect.c: drop path_match function
  fetch-pack: match refs exactly
  t5500: give fully-qualified refs to fetch-pack
  drop "match" parameter from get_remote_heads
This commit is contained in:
Junio C Hamano
2011-12-19 16:05:55 -08:00
8 changed files with 48 additions and 41 deletions

View File

@ -97,7 +97,7 @@ test_expect_success 'setup' '
git symbolic-ref HEAD refs/heads/B
'
pull_to_client 1st "B A" $((11*3))
pull_to_client 1st "refs/heads/B refs/heads/A" $((11*3))
test_expect_success 'post 1st pull setup' '
add A11 $A10 &&
@ -110,9 +110,9 @@ test_expect_success 'post 1st pull setup' '
done
'
pull_to_client 2nd "B" $((64*3))
pull_to_client 2nd "refs/heads/B" $((64*3))
pull_to_client 3rd "A" $((1*3))
pull_to_client 3rd "refs/heads/A" $((1*3))
test_expect_success 'clone shallow' '
git clone --depth 2 "file://$(pwd)/." shallow

29
t/t5527-fetch-odd-refs.sh Executable file
View File

@ -0,0 +1,29 @@
#!/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