1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-27 14:56:49 +03:00
2023-07-30 18:35:21 +10:00

18 lines
403 B
Go

package git_commands
type WorktreeCommands struct {
*GitCommon
}
func NewWorktreeCommands(gitCommon *GitCommon) *WorktreeCommands {
return &WorktreeCommands{
GitCommon: gitCommon,
}
}
func (self *WorktreeCommands) Delete(worktreePath string, force bool) error {
cmdArgs := NewGitCmd("worktree").Arg("remove").ArgIf(force, "-f").Arg(worktreePath).ToArgv()
return self.cmd.New(cmdArgs).Run()
}