diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2018-01-09 18:50:17 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-24 13:48:39 -0800 |
commit | 3ca1897cc1a23f3ad140d759280b73ad7affe696 (patch) | |
tree | d87dbe219b1e528dd4acd9a6e2f113bc7b52c853 /t | |
parent | fd9b544a2991ad74d73ad1bc0af4d24f91a6802b (diff) | |
download | git-3ca1897cc1a23f3ad140d759280b73ad7affe696.tar.gz |
status: update short status to respect --no-ahead-behind
Teach "git status --short --branch" to respect "--no-ahead-behind"
parameter to skip computing ahead/behind counts for the branch and
its upstream and just report '[different]'.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t6040-tracking-info.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh index 8f17fd9da8..019022080b 100755 --- a/t/t6040-tracking-info.sh +++ b/t/t6040-tracking-info.sh @@ -147,6 +147,19 @@ test_expect_success 'status -s -b (diverged from upstream)' ' ' cat >expect <<\EOF +## b1...origin/master [different] +EOF + +test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' ' + ( + cd test && + git checkout b1 >/dev/null && + git status -s -b --no-ahead-behind | head -1 + ) >actual && + test_i18ncmp expect actual +' + +cat >expect <<\EOF ## b5...brokenbase [gone] EOF |