From 5a48d24012fa39cdd02c1cb614db2e62d445e2ce Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 1 Sep 2011 15:43:34 -0700 Subject: rev-list --verify-object Often we want to verify everything reachable from a given set of commits are present in our repository and connected without a gap to the tips of our refs. We used to do this for this purpose: $ rev-list --objects $commits_to_be_tested --not --all Even though this is good enough for catching missing commits and trees, we show the object name but do not verify their existence, let alone their well-formedness, for the blob objects at the leaf level. Add a new "--verify-object" option so that we can catch missing and broken blobs as well. Signed-off-by: Junio C Hamano --- revision.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'revision.c') 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=")) { -- cgit v1.2.1