]> git.ipfire.org Git - thirdparty/git.git/blobdiff - ref-filter.c
assert NOARG/NONEG behavior of parse-options callbacks
[thirdparty/git.git] / ref-filter.c
index 0c45ed9d94a4bd4bfab6c9d441ca9bc7de7ebf31..7eca4362236cb6aee15999ee290a08c4ee06278d 100644 (file)
@@ -2316,6 +2316,8 @@ int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset)
        struct object_id oid;
        int no_merged = starts_with(opt->long_name, "no");
 
+       BUG_ON_OPT_NEG(unset);
+
        if (rf->merge) {
                if (no_merged) {
                        return opterror(opt, "is incompatible with --merged", 0);