summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-11 21:52:43 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-12 18:47:16 +1000
commit2d18d089ce046e7f858b8d1e41469350f879d49c (patch)
treeccff65027a69cdd4aaf4e3577057618965b013d1 /pkg/commands
parent9c7e40906dd52c7077e06d226b31b6afb21727d7 (diff)
allow entering a password when fast forwarding another branch
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 4bfd50437..f4fde0e89 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -791,8 +791,9 @@ func (c *GitCommand) ApplyPatch(patch string, flags ...string) error {
return c.OSCommand.RunCommand("git apply %s %s", flagStr, c.OSCommand.Quote(filepath))
}
-func (c *GitCommand) FastForward(branchName string, remoteName string, remoteBranchName string) error {
- return c.OSCommand.RunCommand("git fetch %s %s:%s", remoteName, remoteBranchName, branchName)
+func (c *GitCommand) FastForward(branchName string, remoteName string, remoteBranchName string, promptUserForCredential func(string) string) error {
+ command := fmt.Sprintf("git fetch %s %s:%s", remoteName, remoteBranchName, branchName)
+ return c.OSCommand.DetectUnamePass(command, promptUserForCredential)
}
func (c *GitCommand) RunSkipEditorCommand(command string) error {