@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Only load refs that are actual commits

Summary: Fix T11301. Git is git.

Test Plan: tagged a file! run discover. no crash.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T11301

Differential Revision: https://secure.phabricator.com/D16261

authored by

Aviv Eyal and committed by
avivey
c56a4fce 1a303e7d

+6 -4
+5 -4
src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
··· 174 174 continue; 175 175 } 176 176 177 - // In Git, it's possible to tag a tag. We just skip these, we'll discover 178 - // them when we process the target tag. See T11180. 177 + // In Git, it's possible to tag anything. We just skip tags that don't 178 + // point to a commit. See T11301. 179 179 $fields = $ref->getRawFields(); 180 + $ref_type = idx($fields, 'objecttype'); 180 181 $tag_type = idx($fields, '*objecttype'); 181 - if ($tag_type == 'tag') { 182 - $this->log(pht('Skipping, this is a tag of a tag.')); 182 + if ($ref_type != 'commit' && $tag_type != 'commit') { 183 + $this->log(pht('Skipping, this is not a commit.')); 183 184 continue; 184 185 } 185 186
+1
src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php
··· 30 30 $this->assertEqual( 31 31 array( 32 32 '763d4ab372445551c95fb5cccd1a7a223f5b2ac8', 33 + '41fa35914aa19c1aa6e57004d9745c05929c3563', 33 34 ), 34 35 mpull($refs, 'getIdentifier')); 35 36 }
src/applications/repository/engine/__tests__/data/GT.git.tgz

This is a binary file and will not be displayed.