Re: [PATCH 2/4] attr: notice and report read failure of .gitattributes files
On Tue, Jun 18, 2024 at 7:46 PM Junio C Hamano <gitster@pobox.com> wrote:
> The code that reads .gitattributes files was careless in dealing in
> unusual circumstances.
>
> - It let read errors silently ignored.
ECANTPARSE: perhaps? s/errors/& be/
Show 10 quoted lines
> - It tried to read ".gitattributes" that is a directory on
> platforms that allowed open(2) to open directories.
>
> To make the latter consistent with what we do for fopen() on
> directories ("git grep" for FREAD_READS_DIRECTORIES for details),
> check if we opened a directory, silently close it and return
> success. Catch all read errors before we close and report as
> needed.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>