]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7508-status.sh
Merge branch 'ea/blame-use-oideq'
[thirdparty/git.git] / t / t7508-status.sh
index e81759319f57b96c1b03afb51dcb93d620f13482..45e1f6ff683a0195a63c0a3a7f6d37cf9d97f623 100755 (executable)
@@ -846,6 +846,18 @@ test_expect_success 'status refreshes the index' '
        test_cmp expect output
 '
 
+test_expect_success 'status shows detached HEAD properly after checking out non-local upstream branch' '
+       test_when_finished rm -rf upstream downstream actual &&
+
+       test_create_repo upstream &&
+       test_commit -C upstream foo &&
+
+       git clone upstream downstream &&
+       git -C downstream checkout @{u} &&
+       git -C downstream status >actual &&
+       test_i18ngrep "HEAD detached at [0-9a-f]\\+" actual
+'
+
 test_expect_success 'setup status submodule summary' '
        test_create_repo sm && (
                cd sm &&