git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] disallow symlinks for .gitignore and .gitattributes
@ 2016-11-02 13:04 Jeff King
  2016-11-02 13:06 ` [PATCH 1/5] add open_nofollow() helper Jeff King
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Jeff King @ 2016-11-02 13:04 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-11-10 11:01 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 13:04 [PATCH 0/5] disallow symlinks for .gitignore and .gitattributes Jeff King
2016-11-02 13:06 ` [PATCH 1/5] add open_nofollow() helper Jeff King
2016-11-02 13:06 ` [PATCH 2/5] attr: convert "macro_ok" into a flags field Jeff King
2016-11-02 13:07 ` [PATCH 3/5] exclude: convert "check_index" " Jeff King
2016-11-02 13:08 ` [PATCH 4/5] attr: do not respect symlinks for in-tree .gitattributes Jeff King
2016-11-07 10:03   ` Duy Nguyen
2016-11-07 21:10     ` Jeff King
2016-11-07 21:15       ` Jeff King
2016-11-08  1:38         ` Duy Nguyen
2016-11-08 22:21           ` Jeff King
2016-11-09  9:22             ` Duy Nguyen
2016-11-09 16:45               ` Jeff King
2016-11-09 20:41             ` Junio C Hamano
2016-11-09 20:43               ` Jeff King
2016-11-09 22:58           ` Junio C Hamano
2016-11-09 23:17             ` Jeff King
2016-11-10  0:18               ` Junio C Hamano
2016-11-10  0:23                 ` Jeff King
2016-11-10 11:00                   ` Duy Nguyen
2016-11-02 13:09 ` [PATCH 5/5] exclude: do not respect symlinks for in-tree .gitignore Jeff King
2016-11-02 19:46 ` [PATCH 0/5] disallow symlinks for .gitignore and .gitattributes Stefan Beller
2016-11-02 19:56   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).