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
F13319962: D19499.id.diff
Thu, Jun 13, 5:33 PM
F13293573: D19499.id46637.diff
Wed, Jun 5, 9:33 AM
F13292184: D19499.id.diff
Wed, Jun 5, 2:38 AM
F13262718: D19499.id46629.diff
Mon, May 27, 2:51 AM
F13247972: D19499.diff
Thu, May 23, 11:54 PM
Unknown Object (File)
Apr 19 2024, 7:47 PM
Unknown Object (File)
Apr 12 2024, 10:46 AM
Unknown Object (File)
Apr 9 2024, 1:48 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
Branch
branch1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20435
Build 27754: Run Core Tests
Build 27753: arc lint + arc unit