[PATCH 0/4] .git{ignore,attributes} directories?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 18, 2024, 23:44 UTC
- Message-ID
- <20240618234436.4107855-1-gitster@pobox.com>
- In-Reply-To
- <20240618233303.GA188880@coredump.intra.peff.net>
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(-)
-- 2.45.2-711-gd2c001ca14