summaryrefslogtreecommitdiff
path: root/parse-options-cb.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-11-05 06:43:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-06 03:55:36 (GMT)
commit735ca208c5463ebbb0991ed02f41b1e30f9dddc1 (patch)
tree689038aa798e3adf30bcf97f7b873abbc33311a5 /parse-options-cb.c
parent0eb8d3767c8f5c87f3bdcbbf9d3d5f73c39422d9 (diff)
downloadgit-735ca208c5463ebbb0991ed02f41b1e30f9dddc1.zip
git-735ca208c5463ebbb0991ed02f41b1e30f9dddc1.tar.gz
git-735ca208c5463ebbb0991ed02f41b1e30f9dddc1.tar.bz2
apply: return -1 from option callback instead of calling exit(1)
The option callback for "apply --whitespace" exits with status "1" on error. It makes more sense for it to just return an error to parse-options. That code will exit, too, but it will use status "129" that is customary for option errors. The exit() dates back to aaf6c447aa (builtin/apply: make parse_whitespace_option() return -1 instead of die()ing, 2016-08-08). That commit gives no reason why we'd prefer the current exit status (it looks like it was just bumping the "die" up a level in the callstack, but did not go as far as it could have). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options-cb.c')
0 files changed, 0 insertions, 0 deletions