RelNotes: minor typo fixes in 2.15.1 draft
[gitweb.git] / t / t4208-log-magic-pathspec.sh
index 001343e2fc2722506172e702266f5bab6278d1e8..935df6a65cab2ba901856633baad7b2e38ebecfa 100755 (executable)
@@ -29,6 +29,12 @@ test_expect_success '"git log -- :/a" should not be ambiguous' '
        git log -- :/a
 '
 
+# This differs from the ":/a" check above in that :/in looks like a pathspec,
+# but doesn't match an actual file.
+test_expect_success '"git log :/in" should not be ambiguous' '
+       git log :/in
+'
+
 test_expect_success '"git log :" should be ambiguous' '
        test_must_fail git log : 2>error &&
        test_i18ngrep ambiguous error
@@ -46,6 +52,32 @@ test_expect_success 'git log HEAD -- :/' '
        test_cmp expected actual
 '
 
+test_expect_success '"git log :^sub" is not ambiguous' '
+       git log :^sub
+'
+
+test_expect_success '"git log :^does-not-exist" does not match anything' '
+       test_must_fail git log :^does-not-exist
+'
+
+test_expect_success  '"git log :!" behaves the same as :^' '
+       git log :!sub &&
+       test_must_fail git log :!does-not-exist
+'
+
+test_expect_success '"git log :(exclude)sub" is not ambiguous' '
+       git log ":(exclude)sub"
+'
+
+test_expect_success '"git log :(exclude)sub --" must resolve as an object' '
+       test_must_fail git log ":(exclude)sub" --
+'
+
+test_expect_success '"git log :(unknown-magic) complains of bogus magic' '
+       test_must_fail git log ":(unknown-magic)" 2>error &&
+       test_i18ngrep pathspec.magic error
+'
+
 test_expect_success 'command line pathspec parsing for "git log"' '
        git reset --hard &&
        >a &&