Re: [PATCH v1 1/4] t1092: add tests for `git-rm`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/3/2022 12:51 AM, Shaoxuan Yuan wrote:
> Add tests for `git-rm`, make sure it behaves as expected when
> <pathspec> is both inside or outside of sparse-checkout definition.

This is good to demonstrate that we already have feature parity,
even if it is because we expand the sparse index immediately.
 
> Also add ensure_not_expanded test to make sure `git-rm` does not
> accidentally expand the index when <pathspec> is within the
> sparse-checkout definition.

> +test_expect_failure 'sparse index is not expanded: rm' '
> +	init_repos &&
> +
> +	ensure_not_expanded rm deep/a &&
> +
> +	# test in-cone wildcard
> +	git -C sparse-index reset --hard &&
> +	ensure_not_expanded rm deep/* &&
> +
> +	# test recursive rm
> +	git -C sparse-index reset --hard &&
> +	ensure_not_expanded rm -r deep
> +'
> +

Instead of adding a test_expect_failure here, I would wait to add
this as a test_expect_success in patch 4.

Thanks,
-Stolee



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux