From daf7d86783b1bd2065881a3f0957f69c79a52fd7 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 1 Jun 2015 05:56:37 -0400 Subject: silence broken link warnings with revs->ignore_missing_links We set revs->ignore_missing_links to instruct the revision-walking machinery that we know the history graph may be incomplete. For example, we use it when walking unreachable but recent objects; we want to add what we can, but it's OK if the history is incomplete. However, we still print error messages for the missing objects, which can be confusing. This is not an error, but just a normal situation when transitioning from a repository last pruned by an older git (which can leave broken segments of history) to a more recent one (where we try to preserve whole reachable segments). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- revision.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'revision.c') diff --git a/revision.c b/revision.c index 75dda928ea..983e4c49ff 100644 --- a/revision.c +++ b/revision.c @@ -834,7 +834,7 @@ static int add_parents_to_list(struct rev_info *revs, struct commit *commit, for (parent = commit->parents; parent; parent = parent->next) { struct commit *p = parent->item; - if (parse_commit(p) < 0) + if (parse_commit_gently(p, revs->ignore_missing_links) < 0) return -1; if (revs->show_source && !p->util) p->util = commit->util; -- cgit v1.2.3 From ce4e7b2ac38cfe5e4c165411d2e37b22e445ab88 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 1 Jun 2015 05:56:40 -0400 Subject: suppress errors on missing UNINTERESTING links When we are traversing commit parents along the UNINTERESTING side of a revision walk, we do not care if the parent turns out to be missing. That lets us limit traversals using unreachable and possibly incomplete sections of history. However, we do still print error messages about the missing commits; this patch suppresses the error, as well. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- revision.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'revision.c') diff --git a/revision.c b/revision.c index 983e4c49ff..9f5476dc70 100644 --- a/revision.c +++ b/revision.c @@ -807,7 +807,7 @@ static int add_parents_to_list(struct rev_info *revs, struct commit *commit, parent = parent->next; if (p) p->object.flags |= UNINTERESTING; - if (parse_commit(p) < 0) + if (parse_commit_gently(p, 1) < 0) continue; if (p->parents) mark_parents_uninteresting(p); -- cgit v1.2.3