summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-06-02 14:25:34 +0200
committerJunio C Hamano <gitster@pobox.com>2022-06-02 12:51:35 -0700
commit53ca569419aed9706b052c48656715ab0b5f14fd (patch)
tree3458649e7d4b6d0fe35de4b8dda1090e5d8eb5c6 /commit.c
parent0cc05b044fd690f37565262a5b09f60c203c5218 (diff)
parse-options.c: use new bug() API for optbug()
When we run into bugs in parse-options.c usage it's good to be able to note all the issues we ran into before dying. This use-case is why we have the optbug() function introduced in 1e5ce570ca3 (parse-options: clearer reporting of API misuse, 2010-12-02) Let's change this code to use the new bug() API introduced in the preceding commit, which cuts down on the verbosity of parse_options_check(). There are existing uses of BUG() in adjacent code that should have been using optbug() that aren't being changed here. That'll be done in a subsequent commit. This only changes the optbug() callers. Since this will invoke BUG() the previous exit(128) code will be changed, but in this case that's what we want, i.e. to have encountering a BUG() return the specific "BUG" exit code. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions