mbox series

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

Message ID 20240618234436.4107855-1-gitster@pobox.com (mailing list archive)
Headers show
Series .git{ignore,attributes} directories? | expand

Message

Junio C Hamano June 18, 2024, 11:44 p.m. UTC
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(-)