mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 04:45:47 +02:00
Basic support for adding a worktree
This commit is contained in:
parent
35e6e6347a
commit
1ce9a87544
4 changed files with 46 additions and 41 deletions
|
@ -10,6 +10,12 @@ func NewWorktreeCommands(gitCommon *GitCommon) *WorktreeCommands {
|
|||
}
|
||||
}
|
||||
|
||||
func (self *WorktreeCommands) New(worktreePath string) error {
|
||||
cmdArgs := NewGitCmd("worktree").Arg("add", worktreePath).ToArgv()
|
||||
|
||||
return self.cmd.New(cmdArgs).Run()
|
||||
}
|
||||
|
||||
func (self *WorktreeCommands) Delete(worktreePath string, force bool) error {
|
||||
cmdArgs := NewGitCmd("worktree").Arg("remove").ArgIf(force, "-f").Arg(worktreePath).ToArgv()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue