unpack-trees: add a note about path invalidation
[gitweb.git] / notes-utils.c
index 02407fe2a7327947dda6bf755405d2778ae450ae..14ea03178e9c44c8c8a05fb70ab038df5ad1b5f8 100644 (file)
@@ -3,6 +3,7 @@
 #include "commit.h"
 #include "refs.h"
 #include "notes-utils.h"
+#include "repository.h"
 
 void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
                         const char *msg, size_t msg_len,
@@ -19,7 +20,8 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
                /* Deduce parent commit from t->ref */
                struct object_id parent_oid;
                if (!read_ref(t->ref, &parent_oid)) {
-                       struct commit *parent = lookup_commit(&parent_oid);
+                       struct commit *parent = lookup_commit(the_repository,
+                                                             &parent_oid);
                        if (parse_commit(parent))
                                die("Failed to find/parse commit %s", t->ref);
                        commit_list_insert(parent, &parents);