commit: add repository argument to lookup_commit
[gitweb.git] / builtin / am.c
index 72e928cee7903d5d7390d07fc8be13f464eb2610..b6eeb46c4b65aefbc83b25d11d2ea28646990137 100644 (file)
@@ -1633,7 +1633,8 @@ static void do_commit(const struct am_state *state)
 
        if (!get_oid_commit("HEAD", &parent)) {
                old_oid = &parent;
-               commit_list_insert(lookup_commit(&parent), &parents);
+               commit_list_insert(lookup_commit(the_repository, &parent),
+                                  &parents);
        } else {
                old_oid = NULL;
                say(state, stderr, _("applying to an empty history"));