Commit c88eb298659dd382406fb947a26d767c08acfebd

Stefan Sperling 2018-03-11T13:15:49

rename worktree_root to root_path in struct worktree

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);