rename worktree_root to root_path in struct worktree
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/lib/got_worktree_priv.h b/lib/got_worktree_priv.h
index e569004..8646f35 100644
--- a/lib/got_worktree_priv.h
+++ b/lib/got_worktree_priv.h
@@ -15,7 +15,7 @@
*/
struct got_worktree {
- char *worktree_root;
+ char *root_path;
char *repo_path;
char *path_prefix;
char *base_commit;
diff --git a/lib/worktree.c b/lib/worktree.c
index 7b501c8..1545acd 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -276,8 +276,8 @@ got_worktree_open(struct got_worktree **worktree, const char *path)
}
(*worktree)->lockfd = -1;
- (*worktree)->worktree_root = strdup(path);
- if ((*worktree)->worktree_root == NULL) {
+ (*worktree)->root_path = strdup(path);
+ if ((*worktree)->root_path == NULL) {
err = got_error(GOT_ERR_NO_MEM);
goto done;
}
@@ -318,7 +318,7 @@ done:
void
got_worktree_close(struct got_worktree *worktree)
{
- free(worktree->worktree_root);
+ free(worktree->root_path);
free(worktree->repo_path);
free(worktree->path_prefix);
free(worktree->base_commit);