Merge branch 'nd/the-index' into md/list-objects-filter-by-depth
[gitweb.git] / builtin / notes.c
index 68062f747511cb6f2859ddc64a09809602373ed8..4996a670f71333de09e1a0311fde85d6985c9c91 100644 (file)
@@ -215,6 +215,8 @@ static int parse_msg_arg(const struct option *opt, const char *arg, int unset)
 {
        struct note_data *d = opt->value;
 
+       BUG_ON_OPT_NEG(unset);
+
        strbuf_grow(&d->buf, strlen(arg) + 2);
        if (d->buf.len)
                strbuf_addch(&d->buf, '\n');
@@ -229,6 +231,8 @@ static int parse_file_arg(const struct option *opt, const char *arg, int unset)
 {
        struct note_data *d = opt->value;
 
+       BUG_ON_OPT_NEG(unset);
+
        if (d->buf.len)
                strbuf_addch(&d->buf, '\n');
        if (!strcmp(arg, "-")) {
@@ -250,6 +254,8 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
        enum object_type type;
        unsigned long len;
 
+       BUG_ON_OPT_NEG(unset);
+
        if (d->buf.len)
                strbuf_addch(&d->buf, '\n');
 
@@ -271,6 +277,7 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
 static int parse_reedit_arg(const struct option *opt, const char *arg, int unset)
 {
        struct note_data *d = opt->value;
+       BUG_ON_OPT_NEG(unset);
        d->use_editor = 1;
        return parse_reuse_arg(opt, arg, unset);
 }
@@ -806,7 +813,7 @@ static int merge(int argc, const char **argv, const char *prefix)
                usage_with_options(git_notes_merge_usage, options);
        }
 
-       init_notes_merge_options(&o);
+       init_notes_merge_options(the_repository, &o);
        o.verbosity = verbosity + NOTES_MERGE_VERBOSITY_DEFAULT;
 
        if (do_abort)