Skip to content

.git{ignore,attributes} directories?

Junio C Hamano git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4.gitignore: introduce GITIGNORE_FILE CPP macrobuiltin/read-tree.c dir.c environment.h+5 -30 replies
2/4attr: notice and report read failure of .gitattributes filesattr.c t/t0003-attributes.sh+18 -15 replies
3/4exclude: notice and report read failure of .gitignore filesdir.c t/t0008-ignores.sh+24 -00 replies
4/4submodule: ignore .gitmodules that is not a regular filedir.c dir.h submodule-config.c+8 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] .git{ignore,attributes} directories?

We seem to blindly open .gitignore that is a directory and rely on subsequent read() to be more-or-less silent to implement a "non-file .gitignore is silently ignored" behaviour.

Let's be a bit more strict in detecting and reporting I/O errors, and also stop reading from directories.

I think the first three are reasonable changes, but the last one is of dubious value.

Junio C Hamano (4):
.gitignore: introduce GITIGNORE_FILE CPP macro
attr: notice and report read failure
exclude: notice and report read failure of .gitignore files
submodule: ignore .gitmodules that is not a regular file

 attr.c                | 10 +++++++++-
 builtin/read-tree.c   |  3 ++-
 dir.c                 | 16 ++++++++++++++--
 dir.h                 |  1 +
 environment.h         |  1 +
 submodule-config.c    |  2 +-
 t/t0003-attributes.sh |  9 +++++++++
 t/t0008-ignores.sh    | 18 ++++++++++++++++++
 8 files changed, 55 insertions(+), 5 deletions(-)
Signature · 1 line
2.45.2-711-gd2c001ca14