summaryrefslogtreecommitdiff
path: root/builtin/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-08-21 16:15:10 -0400
committerJunio C Hamano <gitster@pobox.com>2023-08-21 15:33:24 -0700
commitf126f6ec221ec9f8aac3f1aebf855bbc46e9b796 (patch)
tree48ebd28097b5d4c1196703e837f8e5764617e708 /builtin/diff.c
parent976b97e3fd95d5daa38ed453349f5a92157a1db2 (diff)
diff-files: avoid negative exit value
If loading the index fails, we print an error and then return "-1" from the function. But since this is a builtin, we end up with exit(-1), which produces odd results since program exit codes are unsigned. Because of integer conversion, it usually becomes 255, which is at least still an error, but values above 128 are usually interpreted as signal death. Since we know the program is exiting immediately, we can just replace the error return with a die(). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/diff.c')
0 files changed, 0 insertions, 0 deletions