1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 04:43:08 +03:00

simplify pull logic

This commit is contained in:
Jesse Duffield
2021-10-20 22:21:16 +11:00
parent 5ee559b896
commit 6388af70ac
14 changed files with 163 additions and 224 deletions

View File

@@ -22,7 +22,8 @@ func (c *GitCommand) UpdateRemoteUrl(remoteName string, updatedUrl string) error
func (c *GitCommand) DeleteRemoteBranch(remoteName string, branchName string, promptUserForCredential func(string) string) error {
command := fmt.Sprintf("git push %s --delete %s", c.OSCommand.Quote(remoteName), c.OSCommand.Quote(branchName))
return c.OSCommand.DetectUnamePass(command, promptUserForCredential)
cmdObj := c.NewCmdObjFromStr(command)
return c.OSCommand.DetectUnamePass(cmdObj, promptUserForCredential)
}
// CheckRemoteBranchExists Returns remote branch