Daniels Umanovskis <dani...@umanovskis.se> writes:

> +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
> +'

Reply via email to