| test_description='magic pathspec tests using git-log' |
| test_expect_success 'setup' ' |
| git commit --allow-empty -m empty && |
| test_expect_success '"git log :/" should not be ambiguous' ' |
| test_expect_success '"git log :/a" should be ambiguous (applied both rev and worktree)' ' |
| test_must_fail git log :/a 2>error && |
| test_i18ngrep ambiguous error |
| test_expect_success '"git log :/a -- " should not be ambiguous' ' |
| test_expect_success '"git log -- :/a" should not be ambiguous' ' |
| test_expect_success '"git log :" should be ambiguous' ' |
| test_must_fail git log : 2>error && |
| test_i18ngrep ambiguous error |
| test_expect_success 'git log -- :' ' |
| test_expect_success 'git log HEAD -- :/' ' |
| (cd sub && git log --oneline HEAD -- :/ >../actual) && |
| test_expect_success 'command line pathspec parsing for "git log"' ' |
| git commit -m "add an empty a" --allow-empty && |
| git commit -a -m "update a to 1" && |
| git commit -a -m "update a to 2" && |
| test_must_fail git merge master && |