summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-18 18:16:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-18 18:16:55 (GMT)
commit880bd9d08081752bb4e2891aa3c16c82808ecb2e (patch)
tree03528a146b1e7cca8a7c57b1f9574d05a9ec9ffd /t
parent7c1b228d26107d2cac9fd9549a6a1cff41c24b51 (diff)
parent46077fa5d477a3e96e0bb96042a2a9fdc9c818cb (diff)
downloadgit-880bd9d08081752bb4e2891aa3c16c82808ecb2e.zip
git-880bd9d08081752bb4e2891aa3c16c82808ecb2e.tar.gz
git-880bd9d08081752bb4e2891aa3c16c82808ecb2e.tar.bz2
Merge branch 'mg/status-b'
* mg/status-b: Documentation+t5708: document and test status -s -b Show branch information in short output of git status
Diffstat (limited to 't')
-rwxr-xr-xt/t7508-status.sh47
1 files changed, 46 insertions, 1 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 008d571..9e08107 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -107,13 +107,32 @@ A dir2/added
?? untracked
EOF
-test_expect_success 'status -s (2)' '
+test_expect_success 'status -s' '
git status -s >output &&
test_cmp expect output
'
+cat >expect <<\EOF
+## master
+ M dir1/modified
+A dir2/added
+?? dir1/untracked
+?? dir2/modified
+?? dir2/untracked
+?? expect
+?? output
+?? untracked
+EOF
+
+test_expect_success 'status -s -b' '
+
+ git status -s -b >output &&
+ test_cmp expect output
+
+'
+
cat >expect <<EOF
# On branch master
# Changes to be committed:
@@ -437,6 +456,25 @@ test_expect_success 'status -s with color.status' '
'
cat >expect <<\EOF
+## <GREEN>master<RESET>
+ <RED>M<RESET> dir1/modified
+<GREEN>A<RESET> dir2/added
+<BLUE>??<RESET> dir1/untracked
+<BLUE>??<RESET> dir2/modified
+<BLUE>??<RESET> dir2/untracked
+<BLUE>??<RESET> expect
+<BLUE>??<RESET> output
+<BLUE>??<RESET> untracked
+EOF
+
+test_expect_success 'status -s -b with color.status' '
+
+ git status -s -b | test_decode_color >output &&
+ test_cmp expect output
+
+'
+
+cat >expect <<\EOF
M dir1/modified
A dir2/added
?? dir1/untracked
@@ -469,6 +507,13 @@ test_expect_success 'status --porcelain ignores color.status' '
git config --unset color.status
git config --unset color.ui
+test_expect_success 'status --porcelain ignores -b' '
+
+ git status --porcelain -b >output &&
+ test_cmp expect output
+
+'
+
cat >expect <<\EOF
# On branch master
# Changes to be committed: