Skip to content

Commit

Permalink
Specifying branch name source from refs/heads for fast forwarding (#3807
Browse files Browse the repository at this point in the history
)

- **PR Description**
This fixes #2625
  • Loading branch information
stefanhaller authored Aug 18, 2024
2 parents aa55995 + 6a418c6 commit 7679b10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/commands/git_commands/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (self *SyncCommands) Pull(task gocui.Task, opts PullOptions) error {
Arg("--no-edit").
ArgIf(opts.FastForwardOnly, "--ff-only").
ArgIf(opts.RemoteName != "", opts.RemoteName).
ArgIf(opts.BranchName != "", opts.BranchName).
ArgIf(opts.BranchName != "", "refs/heads/"+opts.BranchName).
GitDirIf(opts.WorktreeGitDir != "", opts.WorktreeGitDir).
ToArgv()

Expand All @@ -112,7 +112,7 @@ func (self *SyncCommands) FastForward(
) error {
cmdArgs := self.fetchCommandBuilder(false).
Arg(remoteName).
Arg(remoteBranchName + ":" + branchName).
Arg("refs/heads/" + remoteBranchName + ":" + branchName).
ToArgv()

return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).Run()
Expand Down

0 comments on commit 7679b10

Please sign in to comment.