summaryrefslogtreecommitdiffstats
path: root/pkg/commands/remotes.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/remotes.go')
-rw-r--r--pkg/commands/remotes.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/commands/remotes.go b/pkg/commands/remotes.go
index 0839f9583..11e5dc26f 100644
--- a/pkg/commands/remotes.go
+++ b/pkg/commands/remotes.go
@@ -2,6 +2,8 @@ package commands
import (
"fmt"
+
+ "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
)
func (c *GitCommand) AddRemote(name string, url string) error {
@@ -23,7 +25,11 @@ 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))
cmdObj := c.NewCmdObjFromStr(command)
- return c.OSCommand.DetectUnamePass(cmdObj, promptUserForCredential)
+ return c.DetectUnamePass(cmdObj, promptUserForCredential)
+}
+
+func (c *GitCommand) DetectUnamePass(cmdObj oscommands.ICmdObj, promptUserForCredential func(string) string) error {
+ return c.OSCommand.DetectUnamePass(cmdObj, c.GetCmdWriter(), promptUserForCredential)
}
// CheckRemoteBranchExists Returns remote branch