summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2012-12-12 06:18:02 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-12-12 11:14:09 -0800
commit938a60d64fc91fd7d646ed33fad527b724d1e534 (patch)
tree02ceb6fe318ea4a3b32e09c8ec7442f0a50670ef /Documentation
parentmailmap: support reading mailmap from blobs (diff)
downloadtgif-938a60d64fc91fd7d646ed33fad527b724d1e534.tar.xz
mailmap: clean up read_mailmap error handling
The error handling for the read_mailmap function is odd. It returns 1 on error, rather than -1. And it treats a non-existent mailmap as an error, even though there is no reason that one needs to exist. Unless some other mailmap source loads successfully, in which case the original error is completely masked. This does not cause any bugs, however, because no caller bothers to check the return value, anyway. Let's make this a little more robust to real errors and less surprising for future callers that do check the error code: 1. Return -1 on errors. 2. Treat a missing entry (e.g., no mailmap.file given), ENOENT, or a non-existent blob (for mailmap.blob) as "no error". 3. Complain loudly when a real error (e.g., a transient I/O error, no permission to open the mailmap file, missing or corrupted blob object, etc) occurs. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions