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.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/commands/remotes.go b/pkg/commands/remotes.go
index 6d69b37cd..779ce9e2b 100644
--- a/pkg/commands/remotes.go
+++ b/pkg/commands/remotes.go
@@ -1,6 +1,8 @@
package commands
import (
+ "fmt"
+
"github.com/jesseduffield/lazygit/pkg/commands/models"
)
@@ -20,8 +22,9 @@ func (c *GitCommand) UpdateRemoteUrl(remoteName string, updatedUrl string) error
return c.OSCommand.RunCommand("git remote set-url %s %s", remoteName, updatedUrl)
}
-func (c *GitCommand) DeleteRemoteBranch(remoteName string, branchName string) error {
- return c.OSCommand.RunCommand("git push %s --delete %s", remoteName, branchName)
+func (c *GitCommand) DeleteRemoteBranch(remoteName string, branchName string, promptUserForCredential func(string) string) error {
+ command := fmt.Sprintf("git push %s --delete %s", remoteName, branchName)
+ return c.OSCommand.DetectUnamePass(command, promptUserForCredential)
}
// CheckRemoteBranchExists Returns remote branch