]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/ignore-broken-tags-when-ignoring-missing-links'
authorJunio C Hamano <gitster@pobox.com>
Mon, 29 May 2017 03:34:54 +0000 (12:34 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 May 2017 03:34:54 +0000 (12:34 +0900)
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

1  2 
revision.c

diff --cc revision.c
index 9c67cb6026e8d39a1f72be35c030297e1ad84784,7d57d440a10e9192491056b4168c3bdc5137d1a9..b02394530926ebe24233de5e6653e7127755675a
@@@ -228,9 -228,9 +228,9 @@@ static struct commit *handle_commit(str
                        add_pending_object(revs, object, tag->tag);
                if (!tag->tagged)
                        die("bad tag");
 -              object = parse_object(tag->tagged->oid.hash);
 +              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));
                }