summaryrefslogtreecommitdiff
path: root/usage.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-26 03:09:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-30 00:14:39 (GMT)
commitdc5a18b3643553cacd6f1a3e4bff6a678b067055 (patch)
tree2a6f6eae339f698628f29d790ddc9ae6b993482a /usage.c
parent95d67879735cfecfdd85f89e59d993c5b4de8835 (diff)
downloadgit-dc5a18b3643553cacd6f1a3e4bff6a678b067055.zip
git-dc5a18b3643553cacd6f1a3e4bff6a678b067055.tar.gz
git-dc5a18b3643553cacd6f1a3e4bff6a678b067055.tar.bz2
compat-util: is_missing_file_error()
Our code often opens a path to an optional file, to work on its contents when we can successfully open it. We can ignore a failure to open if such an optional file does not exist, but we do want to report a failure in opening for other reasons (e.g. we got an I/O error, or the file is there, but we lack the permission to open). The exact errors we need to ignore are ENOENT (obviously) and ENOTDIR (less obvious). Instead of repeating comparison of errno with these two constants, introduce a helper function to do so. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'usage.c')
0 files changed, 0 insertions, 0 deletions