Re: [PATCH 7/7] fsck: complain when .gitattributes or .gitignore is a symlink

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

 



Jeff King wrote:

> The previous commit made it impossible to have a symlinked
> .gitattributes or .gitignore file via verify_path(). Let's add the same
> check to fsck, which matches how we handle .gitmodules symlinks, via
> b7b1fca175 (fsck: complain when .gitmodules is a symlink, 2018-05-04).
>
> Note that we won't add these to the existing gitmodules block. Its logic
> is a bit more complicated, as we also check the content of non-symlink
> instances we find. But for these new files, there is no content check;
> we're just looking at the name and mode of the tree entry (and we can
> avoid even the complicated name checks in the common case that the mode
> doesn't indicate a symlink).

On the subject of where the check gets added, the old description said

	It's easier to handle than .gitmodules, because we don't care
	about checking the blob content. This is really just about
	whether the name and mode for the tree entry are valid.

which I think was self-explanatory enough.  The new text is a little
more confusing because I get lost in figuring out what the "it" in
"Its" refers to.

> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---
>  fsck.c                    | 15 +++++++++++++++
>  t/t7450-bad-meta-files.sh |  9 +++++++++
>  2 files changed, 24 insertions(+)

Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
Thanks for a pleasant read.



[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