Re: [PATCH 7/7] fsck: complain when .gitattributes or .gitignore is a symlink
On Mon, Oct 05, 2020 at 01:12:33AM -0700, Jonathan Nieder wrote:
Show 23 quoted lines
> 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