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/read-tree.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/read-tree.c')
| -rw-r--r-- | builtin/read-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/read-tree.c b/builtin/read-tree.c index fbbc98e516..183ee8c1e5 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -44,6 +44,7 @@ static const char * const read_tree_usage[] = { static int index_output_cb(const struct option *opt, const char *arg, int unset) { + BUG_ON_OPT_NEG(unset); set_alternate_index_output(arg); return 0; } @@ -54,6 +55,8 @@ static int exclude_per_directory_cb(const struct option *opt, const char *arg, struct dir_struct *dir; struct unpack_trees_options *opts; + BUG_ON_OPT_NEG(unset); + opts = (struct unpack_trees_options *)opt->value; if (opts->dir) |
