robertdfrench / git-pr

Pull requests without Git(Hub|Lab)
GNU General Public License v3.0
0 stars 1 forks source link

Thin types to distinguish branch output. Fixes #51. #56

Closed robertdfrench closed 1 year ago

robertdfrench commented 2 years ago

git branch -a and git branch --merged trunk produce different kinds of output, and can't easily be parsed the same way. This commit introduces two types, AllBranches and MergedBranches, which wrap the underlying string output, and serve only to disambiguate which functions can be used against which kinds of values.

There is a lot more that we can refactor here, but I wanted to create the smallest possible solution to #51.