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]

 



On Mon, Oct 05, 2020 at 01:12:33AM -0700, Jonathan Nieder wrote:

> 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.

I rewrote it because I found your original text confusing. ;)

I'll write "The logic for gitmodules is a bit more complicated...".

-Peff



[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