Merge branch 'jk/ignore-broken-tags-when-ignoring-missing-links'

Tag objects, which are not reachable from any ref, that point at
missing objects were mishandled by "git gc" and friends (they
should silently be ignored instead)

* jk/ignore-broken-tags-when-ignoring-missing-links:
  revision.c: ignore broken tags with ignore_missing_links
This commit is contained in:
Junio C Hamano
2017-05-29 12:34:54 +09:00
2 changed files with 27 additions and 2 deletions

View File

@ -230,7 +230,7 @@ static struct commit *handle_commit(struct rev_info *revs,
die("bad tag");
object = parse_object(&tag->tagged->oid);
if (!object) {
if (flags & UNINTERESTING)
if (revs->ignore_missing_links || (flags & UNINTERESTING))
return NULL;
die("bad object %s", oid_to_hex(&tag->tagged->oid));
}