mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Add worktree integration tests
This commit is contained in:
@ -254,6 +254,13 @@ func (self *Shell) Init() *Shell {
|
||||
return self
|
||||
}
|
||||
|
||||
func (self *Shell) AddWorktree(base string, path string, newBranchName string) *Shell {
|
||||
return self.RunCommand([]string{
|
||||
"git", "worktree", "add", "-b",
|
||||
newBranchName, path, base,
|
||||
})
|
||||
}
|
||||
|
||||
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)
|
||||
|
Reference in New Issue
Block a user