diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-11 21:52:43 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-12 18:47:16 +1000 |
commit | 2d18d089ce046e7f858b8d1e41469350f879d49c (patch) | |
tree | ccff65027a69cdd4aaf4e3577057618965b013d1 /pkg/commands | |
parent | 9c7e40906dd52c7077e06d226b31b6afb21727d7 (diff) |
allow entering a password when fast forwarding another branch
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git.go | 5 |
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 { |