Review every new snapshot with an agent from the other vendor
This commit is contained in:
@@ -68,6 +68,20 @@ func AddWorktree(repo, path, branch, base string) (string, error) {
|
||||
return sha, nil
|
||||
}
|
||||
|
||||
func AddDetachedWorktree(repo, path, commit string) error {
|
||||
_, err := run(repo, "worktree", "add", "--detach", path, commit)
|
||||
return err
|
||||
}
|
||||
|
||||
func RemoveDetachedWorktree(repo, path string) error {
|
||||
_, err := os.Stat(path)
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
return nil
|
||||
}
|
||||
_, err = run(repo, "worktree", "remove", "--force", path)
|
||||
return err
|
||||
}
|
||||
|
||||
func RemoveWorktree(repo, path, branch string) error {
|
||||
_, err := run(repo, "worktree", "remove", "--force", path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user