Page MenuHomePhabricator

Consolidate querying of things which we can use `git for-each-ref` for
ClosedPublic

Authored by epriestley on Oct 30 2013, 2:22 PM.
Tags
None
Referenced Files
F19071695: D7447.diff
Sun, Nov 30, 8:16 PM
F18842010: D7447.id16776.diff
Oct 28 2025, 12:52 PM
F18818807: D7447.id.diff
Oct 22 2025, 2:26 AM
F18810068: D7447.id.diff
Oct 19 2025, 7:16 PM
F18792095: D7447.diff
Oct 16 2025, 6:55 PM
F18775380: D7447.diff
Oct 10 2025, 6:51 PM
F18616840: D7447.id.diff
Sep 14 2025, 7:13 PM
F18612069: D7447.diff
Sep 14 2025, 8:43 AM
Subscribers

Details

Reviewers
btrahan
avivey
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rP3bf372c60c2e: Consolidate querying of things which we can use `git for-each-ref` for
Summary

Ref T2230. This cleans up D7442, by using git for-each-ref everywhere we can, in a basically reasonable way.

Test Plan

In bare and non-bare repositories:

  • Ran discovery with bin/repository discover;
  • listed branches on /diffusion/X/;
  • listed tags on /diffusion/X/;
  • listed tags, branches and refs on /diffusion/rXnnnn.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Some of the offset/count logic was a bit goofy so I simplified that, too.

The overall change here is to get rid of code in this form:

if ($bare) {
  $stuff = do_something();
} else {
  $stuff = do_something_very_similar();
}

...and replace it with code in this form:

$stuff = do_something_query($repository);