Code

GIT 1.5.4.5
[git.git] / t / t5512-ls-remote.sh
1 #!/bin/sh
3 test_description='git ls-remote'
5 . ./test-lib.sh
7 test_expect_success setup '
9         >file &&
10         git add file &&
11         test_tick &&
12         git commit -m initial &&
13         git tag mark &&
14         git show-ref --tags -d | sed -e "s/ /   /" >expected.tag &&
15         (
16                 echo "$(git rev-parse HEAD)     HEAD"
17                 git show-ref -d | sed -e "s/ /  /"
18         ) >expected.all &&
20         git remote add self $(pwd)/.git
22 '
24 test_expect_success 'ls-remote --tags .git' '
26         git ls-remote --tags .git >actual &&
27         diff -u expected.tag actual
29 '
31 test_expect_success 'ls-remote .git' '
33         git ls-remote .git >actual &&
34         diff -u expected.all actual
36 '
38 test_expect_success 'ls-remote --tags self' '
40         git ls-remote --tags self >actual &&
41         diff -u expected.tag actual
43 '
45 test_expect_success 'ls-remote self' '
47         git ls-remote self >actual &&
48         diff -u expected.all actual
50 '
52 test_done