3 test_description
='magic pathspec tests using git-log'
7 test_expect_success
'setup' '
10 git commit --allow-empty -m empty &&
14 test_expect_success
'"git log :/" should not be ambiguous' '
18 test_expect_success
'"git log :/a" should be ambiguous (applied both rev and worktree)' '
20 test_must_fail git log :/a 2>error &&
21 test_i18ngrep ambiguous error
24 test_expect_success
'"git log :/a -- " should not be ambiguous' '
28 test_expect_success
'"git log -- :/a" should not be ambiguous' '
32 # This differs from the ":/a" check above in that :/in looks like a pathspec,
33 # but doesn't match an actual file.
34 test_expect_success
'"git log :/in" should not be ambiguous' '
38 test_expect_success
'"git log :" should be ambiguous' '
39 test_must_fail git log : 2>error &&
40 test_i18ngrep ambiguous error
43 test_expect_success
'git log -- :' '
47 test_expect_success
'git log HEAD -- :/' '
48 cat >expected <<-EOF &&
51 (cd sub && git log --oneline HEAD -- :/ >../actual) &&
52 test_cmp expected actual
55 test_expect_success
'command line pathspec parsing for "git log"' '
59 git commit -m "add an empty a" --allow-empty &&
61 git commit -a -m "update a to 1" &&
64 git commit -a -m "update a to 2" &&
65 test_must_fail git merge master &&