mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +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
|
@ -261,6 +261,16 @@ func (self *Shell) AddWorktree(base string, path string, newBranchName string) *
|
|||
})
|
||||
}
|
||||
|
||||
func (self *Shell) AddFileInWorktree(worktreePath string) *Shell {
|
||||
self.CreateFile(filepath.Join(worktreePath, "content"), "content")
|
||||
|
||||
self.RunCommand([]string{
|
||||
"git", "-C", worktreePath, "add", "content",
|
||||
})
|
||||
|
||||
return self
|
||||
}
|
||||
|
||||
func (self *Shell) MakeExecutable(path string) *Shell {
|
||||
// 0755 sets the executable permission for owner, and read/execute permissions for group and others
|
||||
err := os.Chmod(filepath.Join(self.dir, path), 0o755)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue