diff options
-rw-r--r-- | builtin/rev-list.c | 4 | ||||
-rw-r--r-- | revision.c | 5 | ||||
-rw-r--r-- | revision.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 920b91c0c3..ab3be7ca82 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -180,7 +180,11 @@ static void show_object(struct object *obj, const struct name_path *path, const char *component, void *cb_data) { + 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); } diff --git a/revision.c b/revision.c index 072ddac470..5ef498b304 100644 --- a/revision.c +++ b/revision.c @@ -1383,6 +1383,11 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->tree_objects = 1; revs->blob_objects = 1; revs->edge_hint = 1; + } else if (!strcmp(arg, "--verify-objects")) { + revs->tag_objects = 1; + revs->tree_objects = 1; + revs->blob_objects = 1; + revs->verify_objects = 1; } else if (!strcmp(arg, "--unpacked")) { revs->unpacked = 1; } else if (!prefixcmp(arg, "--unpacked=")) { diff --git a/revision.h b/revision.h index da00a58fa5..648876b35d 100644 --- a/revision.h +++ b/revision.h @@ -53,6 +53,7 @@ struct rev_info { tag_objects:1, tree_objects:1, blob_objects:1, + verify_objects:1, edge_hint:1, limited:1, unpacked:1, |