builtin rebase: fast-forward to onto if it is a proper descendant
[gitweb.git] / builtin / diff.c
index b709b6e9842c68597b5bb7149db4054ef980fc53..361a3c3ed38769f798b83933755fed84724ce43c 100644 (file)
@@ -386,7 +386,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
                                add_head_to_pending(&rev);
                                if (!rev.pending.nr) {
                                        struct tree *tree;
-                                       tree = lookup_tree(the_hash_algo->empty_tree);
+                                       tree = lookup_tree(the_repository,
+                                                          the_repository->hash_algo->empty_tree);
                                        add_pending_object(&rev, &tree->object, "HEAD");
                                }
                                break;
@@ -400,8 +401,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
                const char *name = entry->name;
                int flags = (obj->flags & UNINTERESTING);
                if (!obj->parsed)
-                       obj = parse_object(&obj->oid);
-               obj = deref_tag(obj, NULL, 0);
+                       obj = parse_object(the_repository, &obj->oid);
+               obj = deref_tag(the_repository, obj, NULL, 0);
                if (!obj)
                        die(_("invalid object '%s' given."), name);
                if (obj->type == OBJ_COMMIT)