blame: large-scale performance rewrite
[gitweb.git] / notes-utils.c
index db4390081c8d49af959b35c45b4981f70c98f3db..4aa7023903374aa3ccea23d5fc9ae82c9c67bca7 100644 (file)
@@ -18,7 +18,7 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
                unsigned char parent_sha1[20];
                if (!read_ref(t->ref, parent_sha1)) {
                        struct commit *parent = lookup_commit(parent_sha1);
-                       if (!parent || parse_commit(parent))
+                       if (parse_commit(parent))
                                die("Failed to find/parse commit %s", t->ref);
                        commit_list_insert(parent, &parents);
                }
@@ -75,7 +75,7 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb)
                return 0;
        } else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) {
                if (!v)
-                       config_error_nonbool(k);
+                       return config_error_nonbool(k);
                c->combine = parse_combine_notes_fn(v);
                if (!c->combine) {
                        error(_("Bad notes.rewriteMode value: '%s'"), v);