diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:53 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:53 +0900 |
| commit | ab96f28ba4deb71ff64b31bd63cee96314db7112 (patch) | |
| tree | 16ad5cafd201b65eb74c0c132f08b5ecc852fd92 /builtin/rebase.c | |
| parent | fa2f2f085ed8999b799d48e652f9e438571e8491 (diff) | |
| parent | 61b0fcbb64d00d52290d433c1e754c01740b3d19 (diff) | |
| download | git-ab96f28ba4deb71ff64b31bd63cee96314db7112.tar.gz | |
Merge branch 'jk/unused-parameter-fixes'
Various functions have been audited for "-Wunused-parameter" warnings
and bugs in them got fixed.
* jk/unused-parameter-fixes:
midx: double-check large object write loop
assert NOARG/NONEG behavior of parse-options callbacks
parse-options: drop OPT_DATE()
apply: return -1 from option callback instead of calling exit(1)
cat-file: report an error on multiple --batch options
tag: mark "--message" option with NONEG
show-branch: mark --reflog option as NONEG
format-patch: mark "--no-numbered" option with NONEG
status: mark --find-renames option with NONEG
cat-file: mark batch options with NONEG
pack-objects: mark index-version option as NONEG
ls-files: mark exclude options as NONEG
am: handle --no-patch-format option
apply: mark include/exclude options as NONEG
Diffstat (limited to 'builtin/rebase.c')
| -rw-r--r-- | builtin/rebase.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 0ee06aa363..b84568fc4e 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -703,6 +703,9 @@ static int parse_opt_merge(const struct option *opt, const char *arg, int unset) { struct rebase_options *opts = opt->value; + BUG_ON_OPT_NEG(unset); + BUG_ON_OPT_ARG(arg); + if (!is_interactive(opts)) opts->type = REBASE_MERGE; @@ -715,6 +718,9 @@ static int parse_opt_interactive(const struct option *opt, const char *arg, { struct rebase_options *opts = opt->value; + BUG_ON_OPT_NEG(unset); + BUG_ON_OPT_ARG(arg); + opts->type = REBASE_INTERACTIVE; opts->flags |= REBASE_INTERACTIVE_EXPLICIT; |
