aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-11-29 15:41:44 -0800
committerJunio C Hamano <gitster@pobox.com>2021-11-29 15:41:44 -0800
commitdea96aae4d4821a7d516257daa6be4be893887cd (patch)
tree647e84acc652d1d9fd2c2f7801613a48a3d551df /t
parent96eca029bf96dd739c0868ed8cf56cdcf1a248f4 (diff)
parent2e59e78096313920df470b6645a4323e2d8c0c6f (diff)
downloadgit-dea96aae4d4821a7d516257daa6be4be893887cd.tar.gz
Merge branch 'ow/stash-count-in-status-porcelain-output'
Allow "git status --porcelain=v2" to show the number of stash entries with --show-stash like the normal output does. * ow/stash-count-in-status-porcelain-output: status: print stash info with --porcelain=v2 --show-stash status: count stash entries in separate function
Diffstat (limited to 't')
-rwxr-xr-xt/t7064-wtstatus-pv2.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7064-wtstatus-pv2.sh b/t/t7064-wtstatus-pv2.sh
index eeb0534163..47fc21d962 100755
--- a/t/t7064-wtstatus-pv2.sh
+++ b/t/t7064-wtstatus-pv2.sh
@@ -113,6 +113,21 @@ test_expect_success 'after first commit, create unstaged changes' '
test_cmp expect actual
'
+test_expect_success 'after first commit, stash existing changes' '
+ cat >expect <<-EOF &&
+ # branch.oid $H0
+ # branch.head initial-branch
+ # stash 2
+ EOF
+
+ test_when_finished "git stash pop && git stash pop" &&
+
+ git stash -- file_x &&
+ git stash &&
+ git status --porcelain=v2 --branch --show-stash --untracked-files=no >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'after first commit but omit untracked files and branch' '
cat >expect <<-EOF &&
1 .M N... 100644 100644 100644 $OID_X $OID_X file_x