| 1362 | } |
| 1363 | |
| 1364 | static int delete_git_work_tree(struct worktree *wt) |
| 1365 | { |
| 1366 | struct strbuf sb = STRBUF_INIT; |
| 1367 | int ret = 0; |
| 1368 | |
| 1369 | strbuf_addstr(&sb, wt->path); |
| 1370 | if (remove_dir_recursively(&sb, 0)) { |
| 1371 | error_errno(_("failed to delete '%s'"), sb.buf); |
| 1372 | ret = -1; |
| 1373 | } |
| 1374 | strbuf_release(&sb); |
| 1375 | return ret; |
| 1376 | } |
| 1377 | |
| 1378 | static int remove_worktree(int ac, const char **av, const char *prefix, |
| 1379 | struct repository *repo UNUSED) |
no test coverage detected