summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-05-20 08:30:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-20 09:32:58 (GMT)
commita3ba6bf10abcaed1819d27fa45675c3a0e141f95 (patch)
treec12010db2c18156130f55cdc36a8d369da4817d5 /revision.c
parent840ed141983718e0c5518a325534a5656797132a (diff)
downloadgit-a3ba6bf10abcaed1819d27fa45675c3a0e141f95.zip
git-a3ba6bf10abcaed1819d27fa45675c3a0e141f95.tar.gz
git-a3ba6bf10abcaed1819d27fa45675c3a0e141f95.tar.bz2
revision.c: ignore broken tags with ignore_missing_links
When peeling a tag for prepare_revision_walk(), we do not respect the ignore_missing_links flag. This can lead to a bogus error when pack-objects walks the possibly-broken unreachable-but-recent part of the object graph. The other link-following all happens via traverse_commit_list(), which explains why this case was missed. And our tests covered only broken links from commits. Let's be more comprehensive and cover broken tree entries (which do work) and tags (which shows off this bug). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 8a29cb0..7d57d44 100644
--- a/revision.c
+++ b/revision.c
@@ -230,7 +230,7 @@ static struct commit *handle_commit(struct rev_info *revs,
die("bad tag");
object = parse_object(tag->tagged->oid.hash);
if (!object) {
- if (flags & UNINTERESTING)
+ if (revs->ignore_missing_links || (flags & UNINTERESTING))
return NULL;
die("bad object %s", oid_to_hex(&tag->tagged->oid));
}