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
Unknown Object (File)
Sun, Dec 22, 3:23 AM
Unknown Object (File)
Sat, Dec 21, 10:46 AM
Unknown Object (File)
Tue, Dec 17, 9:08 AM
Unknown Object (File)
Sun, Dec 15, 11:23 PM
Unknown Object (File)
Mon, Dec 9, 11:55 PM
Unknown Object (File)
Wed, Dec 4, 11:17 AM
Unknown Object (File)
Wed, Dec 4, 2:26 AM
Unknown Object (File)
Thu, Nov 28, 5:32 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