aboutsummaryrefslogtreecommitdiff
path: root/worktree.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-04-03 13:01:09 -0700
committerJunio C Hamano <gitster@pobox.com>2026-04-03 13:01:09 -0700
commit05ddb9ee8a4c619fbb0e7309fe291bff5cd7c987 (patch)
tree6c4a0689880561d4c409a0765c7cd1c4657cf382 /worktree.h
parent0cd4fb9f46eb0ebd0d243a886ce9a52210e0723e (diff)
parent758086869940c96585f05a0eefe6d2f24fd70630 (diff)
downloadgit-05ddb9ee8a4c619fbb0e7309fe291bff5cd7c987.tar.xz
Merge branch 'pw/worktree-reduce-the-repository'
Reduce the reference to the_repository in the worktree subsystem. * pw/worktree-reduce-the-repository: worktree: reject NULL worktree in get_worktree_git_dir() worktree add: stop reading ".git/HEAD" worktree: remove "the_repository" from is_current_worktree()
Diffstat (limited to 'worktree.h')
-rw-r--r--worktree.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/worktree.h b/worktree.h
index 026ef303e8..d19ec29dbb 100644
--- a/worktree.h
+++ b/worktree.h
@@ -16,7 +16,7 @@ struct worktree {
struct object_id head_oid;
int is_detached;
int is_bare;
- int is_current;
+ int is_current; /* does `path` match `repo->worktree` */
int lock_reason_valid; /* private */
int prune_reason_valid; /* private */
};
@@ -51,7 +51,6 @@ int submodule_uses_worktrees(const char *path);
/*
* Return git dir of the worktree. Note that the path may be relative.
- * If wt is NULL, git dir of current worktree is returned.
*/
char *get_worktree_git_dir(const struct worktree *wt);