mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
Add worktree tests for removing/detaching
This commit is contained in:
parent
277142fc4b
commit
b93b9dae88
9 changed files with 183 additions and 8 deletions
|
@ -54,9 +54,9 @@ func (self *WorktreeCommands) Delete(worktreePath string, force bool) error {
|
|||
}
|
||||
|
||||
func (self *WorktreeCommands) Detach(worktreePath string) error {
|
||||
cmdArgs := NewGitCmd("checkout").Arg("--detach").ToArgv()
|
||||
cmdArgs := NewGitCmd("checkout").Arg("--detach").GitDir(filepath.Join(worktreePath, ".git")).ToArgv()
|
||||
|
||||
return self.cmd.New(cmdArgs).SetWd(worktreePath).Run()
|
||||
return self.cmd.New(cmdArgs).Run()
|
||||
}
|
||||
|
||||
func (self *WorktreeCommands) IsCurrentWorktree(path string) bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue