commit - 1004841d7c8045b627768a441ebdb9c824d2134d
commit + 10a16316a03005a07c45b2bbf1b5644b64e846fb
blob - 8546c7cf32d663cd5a666d40d2f858885cac2483
blob + 426fe05030db9048691647f7a8580d916d95ab60
--- got/got.c
+++ got/got.c
struct got_pathlist_entry *pe;
char *uuidstr = NULL;
int ch, show_files = 0;
- int *pack_fds = NULL;
TAILQ_INIT(&paths);
goto done;
}
- error = got_repo_pack_fds_open(&pack_fds);
- if (error != NULL)
- goto done;
-
error = got_worktree_open(&worktree, cwd);
if (error) {
if (error->code == GOT_ERR_NOT_WORKTREE)
}
#ifndef PROFILE
- /* Remove "cpath" promise. */
- if (pledge("stdio rpath wpath flock proc exec sendfd unveil",
- NULL) == -1)
+ /* Remove "wpath cpath proc exec sendfd" promises. */
+ if (pledge("stdio rpath flock unveil", NULL) == -1)
err(1, "pledge");
#endif
error = apply_unveil(NULL, 0, got_worktree_get_root_path(worktree));
}
}
done:
- if (pack_fds) {
- const struct got_error *pack_err =
- got_repo_pack_fds_close(pack_fds);
- if (error == NULL)
- error = pack_err;
- }
+ if (worktree)
+ got_worktree_close(worktree);
TAILQ_FOREACH(pe, &paths, entry)
free((char *)pe->path);
got_pathlist_free(&paths);