Add convenience builder for git commands

This commit is contained in:
Jesse Duffield 2023-05-19 20:18:02 +10:00
parent 63ddc52a6b
commit 25f8b0337e
22 changed files with 711 additions and 386 deletions

View file

@ -31,7 +31,8 @@ func NewRemoteLoader(
}
func (self *RemoteLoader) GetRemotes() ([]*models.Remote, error) {
remoteBranchesStr, err := self.cmd.New("git branch -r").DontLog().RunWithOutput()
cmdStr := NewGitCmd("branch").Arg("-r").ToString()
remoteBranchesStr, err := self.cmd.New(cmdStr).DontLog().RunWithOutput()
if err != nil {
return nil, err
}