apply --recount: allow "no-op hunks"
[gitweb.git] / t / t2024-checkout-dwim.sh
index 26dc3f1fc0c25df1b359b5d56aece9f171344f5a..69b6774d10a9d90790316e9feb0f718593465c76 100755 (executable)
@@ -24,9 +24,8 @@ test_branch_upstream () {
 }
 
 status_uno_is_clean () {
-       >status.expect &&
        git status -uno --porcelain >status.actual &&
-       test_cmp status.expect status.actual
+       test_must_be_empty status.actual
 }
 
 test_expect_success 'setup' '
@@ -87,8 +86,13 @@ test_expect_success 'checkout of branch from multiple remotes fails with advice'
                checkout foo 2>stderr &&
        test_branch master &&
        status_uno_is_clean &&
-       test_i18ngrep ! "^hint: " stderr &&
-       # Make sure the likes of checkout -p do not print this hint
+       test_i18ngrep ! "^hint: " stderr
+'
+
+test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '
+       git checkout -B master &&
+       test_might_fail git branch -D foo &&
+
        git checkout -p foo 2>stderr &&
        test_i18ngrep ! "^hint: " stderr &&
        status_uno_is_clean