summaryrefslogtreecommitdiffstats
path: root/t/t3203-branch-output.sh
diff options
context:
space:
mode:
authorNickolai Belakovski <nbelakovski@gmail.com>2019-04-29 07:19:44 +0200
committerJunio C Hamano <gitster@pobox.com>2019-05-07 06:45:55 +0200
commit6e9381469e3bd866e73affe6d9d96206ee7ff965 (patch)
treed24a25b1472db7119a46864b4834cc0e6934266a /t/t3203-branch-output.sh
parentbranch: update output to include worktree info (diff)
downloadgit-6e9381469e3bd866e73affe6d9d96206ee7ff965.tar.xz
git-6e9381469e3bd866e73affe6d9d96206ee7ff965.zip
branch: add worktree info on verbose output
To display worktree path for refs checked out in a linked worktree Signed-off-by: Nickolai Belakovski <nbelakovski@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3203-branch-output.sh')
-rwxr-xr-xt/t3203-branch-output.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index a3436bf25a..4bef8c7569 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -328,4 +328,23 @@ test_expect_success '--color overrides auto-color' '
test_cmp expect.color actual
'
+test_expect_success 'verbose output lists worktree path' '
+ one=$(git rev-parse --short HEAD) &&
+ two=$(git rev-parse --short master) &&
+ cat >expect <<-EOF &&
+ * (HEAD detached from fromtag) $one one
+ ambiguous $one one
+ branch-one $two two
+ + branch-two $one ($(pwd)/worktree_dir) one
+ master $two two
+ ref-to-branch $two two
+ ref-to-remote $two two
+ EOF
+ git worktree add worktree_dir branch-two &&
+ git branch -vv >actual &&
+ rm -r worktree_dir &&
+ git worktree prune &&
+ test_i18ncmp expect actual
+'
+
test_done