First batch for 2.3 cycle
[git/mingw.git] / t / t5527-fetch-odd-refs.sh
blobedea9f957e4034098faeb51dec59e9661af8e29e
1 #!/bin/sh
3 test_description='test fetching of oddly-named refs'
4 . ./test-lib.sh
6 # afterwards we will have:
7 # HEAD - two
8 # refs/for/refs/heads/master - one
9 # refs/heads/master - three
10 test_expect_success 'setup repo with odd suffix ref' '
11 echo content >file &&
12 git add . &&
13 git commit -m one &&
14 git update-ref refs/for/refs/heads/master HEAD &&
15 echo content >>file &&
16 git commit -a -m two &&
17 echo content >>file &&
18 git commit -a -m three &&
19 git checkout HEAD^
22 test_expect_success 'suffix ref is ignored during fetch' '
23 git clone --bare file://"$PWD" suffix &&
24 echo three >expect &&
25 git --git-dir=suffix log -1 --format=%s refs/heads/master >actual &&
26 test_cmp expect actual
29 test_done