Merge branch 'nd/the-index' into md/list-objects-filter-by-depth
[gitweb.git] / builtin / notes.c
index 91faa514aaa7f83b06f8ffc9599164c366c394fb..4996a670f71333de09e1a0311fde85d6985c9c91 100644 (file)
@@ -261,10 +261,8 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
 
        if (get_oid(arg, &object))
                die(_("failed to resolve '%s' as a valid ref."), arg);
-       if (!(buf = read_object_file(&object, &type, &len))) {
-               free(buf);
+       if (!(buf = read_object_file(&object, &type, &len)))
                die(_("failed to read object '%s'."), arg);
-       }
        if (type != OBJ_BLOB) {
                free(buf);
                die(_("cannot read note data from non-blob object '%s'."), arg);
@@ -815,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)