Re: [PATCH 0/5] disallow symlinks for .gitignore and .gitattributes
On Wed, Nov 02, 2016 at 12:46:28PM -0700, Stefan Beller wrote: > On Wed, Nov 2, 2016 at 6:04 AM, Jeff King wrote: > > > > > attr.c| 58 > > --- > > $ git diff --stat origin/master..origin/sb/attr |grep attr.c > attr.c | 531 +- > > From a cursory read of your series this may result in a merge > conflict, but would be > easily fixable (changed signature of functions that clash). Yeah, I knew you guys were doing some refactoring of the attribute code elsewhere, but hadn't actually seen how bad the damage was. I just did the merge with sb/attr, though, and the conflicts are quite trivial (mostly s/1/flags/ in bootstrap_attr_stack()). I'm happy to re-roll on a different base if sb/attr graduates first, but I suspect Junio can just resolve the conflicts at merge time. -Peff
Re: [PATCH 0/5] disallow symlinks for .gitignore and .gitattributes
On Wed, Nov 2, 2016 at 6:04 AM, Jeff King wrote: > > attr.c| 58 > --- $ git diff --stat origin/master..origin/sb/attr |grep attr.c attr.c | 531 +- >From a cursory read of your series this may result in a merge conflict, but would be easily fixable (changed signature of functions that clash).
[PATCH 0/5] disallow symlinks for .gitignore and .gitattributes
I noticed in a nearby discussion that we will follow in-filesystem symlinks for in-tree .gitignore and .gitattributes files, but not when those files are read out of the index (e.g., when switching branches). This series teaches git to open those files with O_NOFOLLOW (when it is available) to get more consistent behavior. Note that this only applies to the in-tree versions; you can still symlink $GIT_DIR/info/attributes, etc. I stopped short of warning about symlinked entries in git-fsck, but perhaps we would want to do that as well (doing it completely is tricky because of all of the case-folding issues around matching pathnames). [1/5]: add open_nofollow() helper [2/5]: attr: convert "macro_ok" into a flags field [3/5]: exclude: convert "check_index" into a flags field [4/5]: attr: do not respect symlinks for in-tree .gitattributes [5/5]: exclude: do not respect symlinks for in-tree .gitignore attr.c| 58 --- dir.c | 20 +- dir.h | 2 +- git-compat-util.h | 3 +++ t/t0003-attributes.sh | 31 +++ t/t0008-ignores.sh| 29 ++ wrapper.c | 8 +++ 7 files changed, 123 insertions(+), 28 deletions(-) -Peff