summaryrefslogtreecommitdiff
path: root/t/t5512-ls-remote.sh
blob: 6ec5f7c48bdde7ff41e14c1e355b79387140ecf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh

test_description='git ls-remote'

. ./test-lib.sh

test_expect_success setup '

	>file &&
	git add file &&
	test_tick &&
	git commit -m initial &&
	git tag mark &&
	git show-ref --tags -d | sed -e "s/ /	/" >expected.tag &&
	(
		echo "$(git rev-parse HEAD)	HEAD"
		git show-ref -d	| sed -e "s/ /	/"
	) >expected.all &&

	git remote add self $(pwd)/.git

'

test_expect_success 'ls-remote --tags .git' '

	git ls-remote --tags .git >actual &&
	diff -u expected.tag actual

'

test_expect_success 'ls-remote .git' '

	git ls-remote .git >actual &&
	diff -u expected.all actual

'

test_expect_success 'ls-remote --tags self' '

	git ls-remote --tags self >actual &&
	diff -u expected.tag actual

'

test_expect_success 'ls-remote self' '

	git ls-remote self >actual &&
	diff -u expected.all actual

'

test_done