Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-06-18 23:21:28 +0300
committerJunio C Hamano <gitster@pobox.com>2019-06-21 19:35:03 +0300
commitfb4db1a298b75536a861485bda27e3f1e098d6f6 (patch)
treee6837d210af95827f2ae69bd60f21856d1cf5d61 /t/t7064-wtstatus-pv2.sh
parent0a53561a6221f989b210797e62e83fb7260fa42c (diff)
status: ignore status.aheadbehind in porcelain formats
Teach porcelain V[12] formats to ignore the status.aheadbehind config setting. They only respect the --[no-]ahead-behind command line argument. This is for backwards compatibility with existing scripts. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7064-wtstatus-pv2.sh')
-rwxr-xr-xt/t7064-wtstatus-pv2.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/t/t7064-wtstatus-pv2.sh b/t/t7064-wtstatus-pv2.sh
index a0baf6e8b0..537787e598 100755
--- a/t/t7064-wtstatus-pv2.sh
+++ b/t/t7064-wtstatus-pv2.sh
@@ -436,10 +436,6 @@ test_expect_success 'verify --[no-]ahead-behind with V2 format' '
git status --no-ahead-behind --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
- # Confirmat that "status.aheadbehind" works on V2 format.
- git -c status.aheadbehind=false status --porcelain=v2 --branch --untracked-files=all >actual &&
- test_cmp expect actual &&
-
# Confirm --ahead-behind reports traditional branch.ab with 1/0.
cat >expect <<-EOF &&
# branch.oid $HUF
@@ -449,6 +445,14 @@ test_expect_success 'verify --[no-]ahead-behind with V2 format' '
EOF
git status --ahead-behind --porcelain=v2 --branch --untracked-files=all >actual &&
+ test_cmp expect actual &&
+
+ # Confirm that "status.aheadbehind" DOES NOT work on V2 format.
+ git -c status.aheadbehind=false status --porcelain=v2 --branch --untracked-files=all >actual &&
+ test_cmp expect actual &&
+
+ # Confirm that "status.aheadbehind" DOES NOT work on V2 format.
+ git -c status.aheadbehind=true status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
'