Re: [PATCH] Make git rm submodule succeed if .gitmodules index stat info is zero

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

 



David Turner <dturner@xxxxxxxxxxxx> writes:

> The bug was that ie_match_stat was used to compare if the stat info
> for the file was compatible with the stat info in the index, rather
> using ie_modified to check if the file was in fact different from the
> version in the index.

Makes sense.  ie_match_stat() often ends up comparing the file
contents in our tests due to sequence Git commands firing too
rapidly, leading to a racy-index status, but read-tree is a reliable
way to clear the cached stat information to force it say "I dunno---
suspect it got modified".  Will queue.

> +test_expect_success 'rm will not error out on .gitmodules file with zero stat data' '
> +	git reset --hard &&
> +	git submodule update &&
> +	git read-tree HEAD &&
> +	git rm submod &&
> +	test_path_is_missing submod
> +'
>  
>  test_expect_success 'rm issues a warning when section is not found in .gitmodules' '
>  	git reset --hard &&



[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