X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft7508-status.sh;h=f1dc5c3b6a36507e664e624bf9cebb1634bce335;hb=5bb20ece6bdb31d395667855990dc540f2940a41;hp=c9300f3c8b246e3c81570532534748e510a2865f;hpb=e0cbf12bf7d8b46292774ac91db8757d60b0f4df;p=git.git diff --git a/t/t7508-status.sh b/t/t7508-status.sh index c9300f3c8..f1dc5c3b6 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -7,6 +7,30 @@ test_description='git status' . ./test-lib.sh +test_expect_success 'status -h in broken repository' ' + mkdir broken && + test_when_finished "rm -fr broken" && + ( + cd broken && + git init && + echo "[status] showuntrackedfiles = CORRUPT" >>.git/config && + test_expect_code 129 git status -h >usage 2>&1 + ) && + grep "[Uu]sage" broken/usage +' + +test_expect_success 'commit -h in broken repository' ' + mkdir broken && + test_when_finished "rm -fr broken" && + ( + cd broken && + git init && + echo "[status] showuntrackedfiles = CORRUPT" >>.git/config && + test_expect_code 129 git commit -h >usage 2>&1 + ) && + grep "[Uu]sage" broken/usage +' + test_expect_success 'setup' ' : >tracked && : >modified && @@ -44,7 +68,7 @@ cat >expect <<\EOF # # new file: dir2/added # -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -73,7 +97,7 @@ cat >expect <<\EOF # Changes to be committed: # new file: dir2/added # -# Changed but not updated: +# Changes not staged for commit: # modified: dir1/modified # # Untracked files: @@ -140,7 +164,7 @@ cat >expect <..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -167,7 +191,7 @@ cat >expect <expect <..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -260,7 +284,7 @@ cat >expect <..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -320,7 +344,7 @@ cat >expect <<\EOF # # new file: ../dir2/added # -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -381,18 +405,19 @@ test_expect_success 'status --porcelain ignores relative paths setting' ' test_expect_success 'setup unique colors' ' - git config status.color.untracked blue + git config status.color.untracked blue && + git config status.color.branch green ' cat >expect <<\EOF -# On branch master +# On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # new file: dir2/added # -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -521,7 +546,7 @@ cat >expect <<\EOF # # new file: dir2/added # -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -614,7 +639,7 @@ cat >expect <..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -673,7 +698,7 @@ cat >expect <..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -718,7 +743,7 @@ test_expect_success 'status -s submodule summary' ' cat >expect <..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -766,7 +791,7 @@ cat >expect <..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -819,7 +844,7 @@ cat > expect << EOF # # modified: sm # -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -931,7 +956,7 @@ cat > expect << EOF # # modified: sm # -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # (commit or discard the untracked or modified content in submodules) @@ -989,7 +1014,7 @@ cat > expect << EOF # # modified: sm # -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -1067,7 +1092,7 @@ test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary cat > expect << EOF # On branch master -# Changed but not updated: +# Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) #