On Sat, May 1, 2021 at 11:43 AM Jeff King <peff@xxxxxxxx> wrote: > We stopped allowing symlinks for .gitmodules files in 10ecfa7649 > (verify_path: disallow symlinks in .gitmodules, 2018-05-04), and we > stopped following symlinks for .gitattributes, .gitignore, and .mailmap > in the commits from 204333b015 (Merge branch 'jk/open-dotgitx-with-nofollow', > 2021-03-22). The reasons are discussed in detail there, but we never > adjusted the documentation to let users know. > > This hasn't been a big deal since the point is that such setups were > mildly broken and thought to be unusual anyway. But it certainly doesn't > hurt to be clear and explicit about it. Just a really microscopic nit... feel free to ignore... > diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt > @@ -1247,6 +1247,13 @@ to: > +NOTES > +----- > + > +Note that Git does not follow symbolic links when accessing a > +`.gitattributes` file in the working tree. This keeps behavior > +consistent when the file is accessed from the index or a tree versus > +from the filesystem. We're in the "NOTES" section, so it feels redundant to begin the sentence with "Note that". > diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt > @@ -98,6 +98,14 @@ submodule.<name>.shallow:: > +NOTES > +----- > + > +Note that Git does not allow the `.gitmodules` file within a working > +tree to be a symbolic link, and will refuse to check out such a tree > +entry. This keeps behavior consistent when the file is accessed from the > +index or a tree versus from the filesystem, and helps Git reliably > +enforce security checks of the file contents. Ditto.