diff --git a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php index ca9f7c5dc9..a4f697da0c 100644 --- a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php @@ -174,12 +174,13 @@ final class PhabricatorRepositoryDiscoveryEngine continue; } - // In Git, it's possible to tag a tag. We just skip these, we'll discover - // them when we process the target tag. See T11180. + // In Git, it's possible to tag anything. We just skip tags that don't + // point to a commit. See T11301. $fields = $ref->getRawFields(); + $ref_type = idx($fields, 'objecttype'); $tag_type = idx($fields, '*objecttype'); - if ($tag_type == 'tag') { - $this->log(pht('Skipping, this is a tag of a tag.')); + if ($ref_type != 'commit' && $tag_type != 'commit') { + $this->log(pht('Skipping, this is not a commit.')); continue; } diff --git a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php index f912a551c5..a15cb3d79f 100644 --- a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php +++ b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php @@ -30,6 +30,7 @@ final class PhabricatorWorkingCopyDiscoveryTestCase $this->assertEqual( array( '763d4ab372445551c95fb5cccd1a7a223f5b2ac8', + '41fa35914aa19c1aa6e57004d9745c05929c3563', ), mpull($refs, 'getIdentifier')); } diff --git a/src/applications/repository/engine/__tests__/data/GT.git.tgz b/src/applications/repository/engine/__tests__/data/GT.git.tgz index b53e9a2d1c..afd7e04a96 100644 Binary files a/src/applications/repository/engine/__tests__/data/GT.git.tgz and b/src/applications/repository/engine/__tests__/data/GT.git.tgz differ