MCPcopy
hub / github.com/dagger/container-use / deleteWorktree

Method deleteWorktree

repository/git.go:89–96  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

87}
88
89func (r *Repository) deleteWorktree(id string) error {
90 worktreePath, err := r.WorktreePath(id)
91 if err != nil {
92 return err
93 }
94 fmt.Printf("Deleting worktree at %s\n", worktreePath)
95 return os.RemoveAll(worktreePath)
96}
97
98func (r *Repository) deleteLocalRemoteBranch(id string) error {
99 slog.Info("Pruning git worktrees", "repo", r.forkRepoPath)

Callers 1

DeleteMethod · 0.95

Calls 1

WorktreePathMethod · 0.95

Tested by

no test coverage detected