revert: pass around rev-list args in already-parsed form
[gitweb.git] / builtin / rev-list.c
index f5ce4873e339ac748065e372c1c5e4830062320f..ab3be7ca82ea36fbb1e98f8b899970a6748981c6 100644 (file)
@@ -168,15 +168,23 @@ static void finish_commit(struct commit *commit, void *data)
        commit->buffer = NULL;
 }
 
-static void finish_object(struct object *obj, const struct name_path *path, const char *name)
+static void finish_object(struct object *obj,
+                         const struct name_path *path, const char *name,
+                         void *cb_data)
 {
        if (obj->type == OBJ_BLOB && !has_sha1_file(obj->sha1))
                die("missing blob object '%s'", sha1_to_hex(obj->sha1));
 }
 
-static void show_object(struct object *obj, const struct name_path *path, const char *component)
+static void show_object(struct object *obj,
+                       const struct name_path *path, const char *component,
+                       void *cb_data)
 {
-       finish_object(obj, path, component);
+       struct rev_info *info = cb_data;
+
+       finish_object(obj, path, component, cb_data);
+       if (info->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
+               parse_object(obj->sha1);
        show_object_with_name(stdout, obj, path, component);
 }