Page MenuHomePhabricator

If "branch" is provided to "diffusion.branchquery", use it as the "<pattern>" argument to "git branch --contains ..."
ClosedPublic

Authored by epriestley on Jun 21 2018, 10:31 PM.
Tags
None
Referenced Files
F18749743: D19499.id.diff
Oct 4 2025, 4:59 AM
F18728798: D19499.id46629.diff
Sep 30 2025, 10:07 AM
F18672788: D19499.diff
Sep 25 2025, 8:13 AM
F18627745: D19499.id46637.diff
Sep 16 2025, 4:41 AM
F18509677: D19499.id.diff
Sep 5 2025, 3:32 AM
F18502944: D19499.diff
Sep 4 2025, 10:45 PM
F18389557: D19499.diff
Aug 29 2025, 5:54 AM
F18110463: D19499.id46629.diff
Aug 11 2025, 7:58 PM
Subscribers
None

Details

Summary

Ref T13151. See PHI720. If you want to test if commit X appears on specific branch Y, git branch --contains X -- Y is faster than (effectively) git branch --contains X | grep Y.

Since this call has a "branch" parameter anyway, use it as the pattern argument if provided.

Test Plan
  • Called the API method with no parameters, got all branches.
  • Called the API method with master, got just master.
  • Called the API method with maste*, got master. This behavior is not officially supported and may change in the future.
  • Viewed a commit, still saw all branches.
    • Grepped for diffusion.branchquery and verified that no remaining callsites pass a default "branch" parameter.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable