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 &&
24 test_expect_success '"git log :/a -- " should not be ambiguous' '
28 test_expect_success '"git log -- :/a" should not be ambiguous' '
32 test_expect_success '"git log :" should be ambiguous' '
33 test_must_fail git log : 2>error &&
37 test_expect_success 'git log -- :' '
41 test_expect_success 'git log HEAD -- :/' '
42 cat >expected <<-EOF &&
45 (cd sub && git log --oneline HEAD -- :/ >../actual) &&
46 test_cmp expected actual
49 test_expect_success 'command line pathspec parsing for "git log"' '
53 git commit -m "add an empty a" --allow-empty &&
55 git commit -a -m "update a to 1" &&
58 git commit -a -m "update a to 2" &&
59 test_must_fail git merge master &&