diff options
author | Jeff King <peff@peff.net> | 2018-11-05 01:43:44 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-06 12:55:36 +0900 |
commit | 0eb8d3767c8f5c87f3bdcbbf9d3d5f73c39422d9 (patch) | |
tree | 4561e716a7b5816df4aeabae3c7c4882ce9af91c /.gitignore | |
parent | tag: mark "--message" option with NONEG (diff) | |
download | tgif-0eb8d3767c8f5c87f3bdcbbf9d3d5f73c39422d9.tar.xz |
cat-file: report an error on multiple --batch options
The options callback for --batch and --batch-check detects when the two
mutually incompatible options are used. But it simply returns an error
code to parse-options, meaning the program will quit without any kind of
message to the user.
Instead, let's use error() to print something and return -1. Note that
this flips the error return from 1 to -1, but negative values are more
idiomatic here (and parse-options treats them the same).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions