commit-graph: use string-list API for input
[gitweb.git] / builtin / diff.c
index 00424c296d19e3812115659cdc3dc82a68359e85..b709b6e9842c68597b5bb7149db4054ef980fc53 100644 (file)
@@ -405,7 +405,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
                if (!obj)
                        die(_("invalid object '%s' given."), name);
                if (obj->type == OBJ_COMMIT)
-                       obj = &((struct commit *)obj)->tree->object;
+                       obj = &get_commit_tree(((struct commit *)obj))->object;
 
                if (obj->type == OBJ_TREE) {
                        obj->flags |= flags;