Re: [PATCH v4] branch: introduce --show-current display option
Daniels Umanovskis <daniels@umanovskis.se> writes:
Show 11 quoted lines
> +test_expect_success 'git branch `--show-current` works properly with worktrees' '
> + cat >expect <<-\EOF &&
> + branch-one
> + branch-two
> + EOF
> + git checkout branch-one &&
> + git worktree add worktree branch-two &&
> + (
> + git branch --show-current &&
> + cd worktree &&
> + git branch --show-current
This is not wrong per-se, but
git branch --show-current &&
git -C worktree branch --show-current
would be shorter.
> + ) >actual &&
> + test_cmp expect actual
> +'