1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

Add worktree option to fast forwarding operation

This commit is contained in:
John Mutuma
2024-11-08 15:40:07 +00:00
committed by Jesse Duffield
parent c4e59aea66
commit e1c18226bf
5 changed files with 73 additions and 0 deletions

View File

@ -88,6 +88,7 @@ type PullOptions struct {
BranchName string
FastForwardOnly bool
WorktreeGitDir string
WorktreePath string
}
func (self *SyncCommands) Pull(task gocui.Task, opts PullOptions) error {
@ -97,6 +98,7 @@ func (self *SyncCommands) Pull(task gocui.Task, opts PullOptions) error {
ArgIf(opts.RemoteName != "", opts.RemoteName).
ArgIf(opts.BranchName != "", "refs/heads/"+opts.BranchName).
GitDirIf(opts.WorktreeGitDir != "", opts.WorktreeGitDir).
WorktreePathIf(opts.WorktreePath != "", opts.WorktreePath).
ToArgv()
// setting GIT_SEQUENCE_EDITOR to ':' as a way of skipping it, in case the user