commit - 70ac5f8404f46cd2a9d3cb6c34cb89e61c76df1f
commit + c02c541e86ab0a00bfa00cfe311ad98d536355c3
blob - e083023d4b4d640205a1f9554968d287c356fdc3
blob + cef2aab59352903c01572876d40672efeca7ceaf
--- got/got.c
+++ got/got.c
}
} else
usage_checkout();
-
- error = apply_unveil(repo_path, 0, worktree_path);
- if (error)
- goto done;
error = got_repo_open(&repo, repo_path);
if (error != NULL)
+ goto done;
+
+ error = apply_unveil(got_repo_get_path(repo), 0, worktree_path);
+ if (error)
goto done;
error = got_ref_open(&head_ref, repo, GOT_REF_HEAD);
error = got_error_from_errno();
goto done;
}
-
- error = apply_unveil(repo_path, 1,
- worktree ? got_worktree_get_root_path(worktree) : NULL);
- if (error)
- goto done;
error = got_repo_open(&repo, repo_path);
if (error != NULL)
goto done;
+ error = apply_unveil(got_repo_get_path(repo), 1,
+ worktree ? got_worktree_get_root_path(worktree) : NULL);
+ if (error)
+ goto done;
+
if (start_commit == NULL) {
struct got_reference *head_ref;
error = got_ref_open(&head_ref, repo, GOT_REF_HEAD);
if (repo_path == NULL)
return got_error_from_errno();
}
-
- error = apply_unveil(repo_path, 1,
- worktree ? got_worktree_get_root_path(worktree) : NULL);
- if (error)
- goto done;
error = got_repo_open(&repo, repo_path);
free(repo_path);
if (error != NULL)
goto done;
+ error = apply_unveil(got_repo_get_path(repo), 1,
+ worktree ? got_worktree_get_root_path(worktree) : NULL);
+ if (error)
+ goto done;
+
if (worktree) {
struct print_diff_arg arg;
char *id_str;
}
}
- error = apply_unveil(repo_path, 1, NULL);
- if (error)
+ error = got_repo_open(&repo, repo_path);
+ if (error != NULL)
goto done;
- error = got_repo_open(&repo, repo_path);
- if (error != NULL)
+ error = apply_unveil(got_repo_get_path(repo), 1, NULL);
+ if (error)
goto done;
if (worktree) {
}
}
- error = apply_unveil(repo_path, 1, NULL);
- if (error)
- goto done;
-
error = got_repo_open(&repo, repo_path);
if (error != NULL)
+ goto done;
+
+ error = apply_unveil(got_repo_get_path(repo), 1, NULL);
+ if (error)
goto done;
if (path == NULL) {
}
}
}
-
- error = apply_unveil(repo_path, do_list,
- worktree ? got_worktree_get_root_path(worktree) : NULL);
- if (error)
- goto done;
error = got_repo_open(&repo, repo_path);
if (error != NULL)
goto done;
+ error = apply_unveil(got_repo_get_path(repo), do_list,
+ worktree ? got_worktree_get_root_path(worktree) : NULL);
+ if (error)
+ goto done;
+
if (do_list)
error = list_refs(repo);
else if (delref)
blob - 6a5d7979534112e3d421c7b0de965e7f10ef4eb6
blob + 059eaa8e6eab47815fe27e61729bced6196ccbd1
--- tog/tog.c
+++ tog/tog.c
}
init_curses();
-
- error = apply_unveil(repo_path,
- worktree ? got_worktree_get_root_path(worktree) : NULL);
- if (error)
- goto done;
error = got_repo_open(&repo, repo_path);
if (error != NULL)
goto done;
+ error = apply_unveil(got_repo_get_path(repo),
+ worktree ? got_worktree_get_root_path(worktree) : NULL);
+ if (error)
+ goto done;
+
if (start_commit == NULL)
error = get_head_commit_id(&start_id, repo);
else
init_curses();
- error = apply_unveil(repo_path, NULL);
+ error = got_repo_open(&repo, repo_path);
if (error)
goto done;
- error = got_repo_open(&repo, repo_path);
- free(repo_path);
+ error = apply_unveil(got_repo_get_path(repo), NULL);
if (error)
goto done;
goto done;
error = view_loop(view);
done:
+ free(repo_path);
got_repo_close(repo);
got_ref_list_free(&refs);
return error;
init_curses();
- error = apply_unveil(repo_path, NULL);
- if (error)
+ error = got_repo_open(&repo, repo_path);
+ if (error != NULL)
goto done;
- error = got_repo_open(&repo, repo_path);
- if (error != NULL)
+ error = apply_unveil(got_repo_get_path(repo), NULL);
+ if (error)
goto done;
if (worktree) {
init_curses();
- error = apply_unveil(repo_path, NULL);
- if (error)
+ error = got_repo_open(&repo, repo_path);
+ if (error != NULL)
goto done;
- error = got_repo_open(&repo, repo_path);
- if (error != NULL)
+ error = apply_unveil(got_repo_get_path(repo), NULL);
+ if (error)
goto done;
if (commit_id_arg == NULL)