@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.

Ignore unrecognized refs in "refs/remotes/"

Summary: Ref T9028. When selecting refs, pretend refs in "refs/remotes/" that we don't otherwise recognize don't exist, since it looks like these are probably remotes //of the remote// we're observing, and who knows what state they're in.

Test Plan: Used `bin/repository discover --verbose` to verify that these named refs no longer appear in the list.

Reviewers: chad, joshuaspence

Reviewed By: joshuaspence

Maniphest Tasks: T9028

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

+9
+9
src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php
··· 70 70 return array(); 71 71 } 72 72 73 + $remote_prefix = 'refs/remotes/'; 74 + $remote_len = strlen($remote_prefix); 75 + 73 76 // NOTE: Although git supports --count, we can't apply any offset or 74 77 // limit logic until the very end because we may encounter a HEAD which 75 78 // we want to discard. ··· 86 89 } else if (!strncmp($refname, $tag_prefix, $tag_len)) { 87 90 $short = substr($refname, $tag_len); 88 91 $type = $type_tag; 92 + } else if (!strncmp($refname, $remote_prefix, $remote_len)) { 93 + // If we've found a remote ref that we didn't recognize as naming a 94 + // branch, just ignore it. This can happen if we're observing a remote, 95 + // and that remote has its own remotes. We don't care about their 96 + // state and they may be out of date, so ignore them. 97 + continue; 89 98 } else { 90 99 $short = $refname; 91 100 $type = $type_ref;