summaryrefslogtreecommitdiff
path: root/t/t4208-log-magic-pathspec.sh
blob: 2c482b622b4a9e68bb0614dec8e156d5dfc8fa06 (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
#!/bin/sh
 
test_description='magic pathspec tests using git-log'
 
. ./test-lib.sh
 
test_expect_success 'setup' '
	test_commit initial &&
	test_tick &&
	git commit --allow-empty -m empty &&
	mkdir sub
'
 
test_expect_success '"git log :/" should be ambiguous' '
	test_must_fail git log :/ 2>error &&
	grep ambiguous error
'
 
test_expect_success '"git log :" should be ambiguous' '
	test_must_fail git log : 2>error &&
	grep ambiguous error
'
 
test_expect_success 'git log -- :' '
	git log -- :
'
 
test_expect_success 'git log HEAD -- :/' '
	cat >expected <<-EOF &&
	24b24cf initial
	EOF
	(cd sub && git log --oneline HEAD -- :/ >../actual) &&
	test_cmp expected actual
'
 
test_done