Ray Zhang <[email protected]> writes:

> By adding this option which defaults to true, we can use the
> corresponding --no-checkout to make some customizations before
> the checkout, like sparse checkout, etc.
>
> Helped-by: Eric Sunshine <[email protected]>
> Helped-by: Junio C Hamano <[email protected]>
> Reviewed-by: Eric Sunshine <[email protected]>
> Signed-off-by: Ray Zhang <[email protected]>
> ---

Thanks.  Will queue.

> diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh
> index cbfa41e..472b811 100755
> --- a/t/t2025-worktree-add.sh
> +++ b/t/t2025-worktree-add.sh
> @@ -213,4 +213,17 @@ test_expect_success 'local clone from linked checkout' '
>       ( cd here-clone && git fsck )
>  '
>  
> +test_expect_success '"add" worktree with --no-checkout' '
> +     git worktree add --no-checkout -b swamp swamp &&
> +     ls swamp >actual &&
> +     test_line_count = 0 actual &&

The remainder of the test (both existing and added parts)
seems to only care about init.t; running "ls swamp" feels
somewhat inconsistent.  We could replace the two lines with

        ! test -e swamp/init.t

to address this, but I do not think it is worth a patch churn.

> +     git -C swamp reset --hard &&
> +     test_cmp init.t swamp/init.t
> +'
> +test_expect_success '"add" worktree with --checkout' '
> +     git worktree add --checkout -b swmap2 swamp2 &&
> +     test_cmp init.t swamp2/init.t
> +'
> +
>  test_done
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to