Skip to content

Commit

Permalink
Specifying branch name source from refs/heads for fast forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
Neko-Box-Coder authored and stefanhaller committed Aug 18, 2024
1 parent aa55995 commit 6a418c6
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 6a418c6

Please sign in to comment.