diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-05-17 22:58:30 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-05-17 22:58:30 +0900 |
| commit | 068c10c7413fee5a69db1a46fb32f335675b25ca (patch) | |
| tree | 96439edb8570c49dfb26b565b175ffefd6d7859d | |
| parent | c26c58de0cfbe2987267b5b106a6399f7f644bdc (diff) | |
| parent | 8547908eb30d8b3ee074081f89fa29c6d6d077c2 (diff) | |
| download | git-068c10c7413fee5a69db1a46fb32f335675b25ca.tar.gz git-068c10c7413fee5a69db1a46fb32f335675b25ca.zip | |
Merge branch 'pw/rename-to-get-current-worktree'
Code clean-up.
* pw/rename-to-get-current-worktree:
worktree: rename get_worktree_from_repository()
| -rw-r--r-- | worktree.c | 2 | ||||
| -rw-r--r-- | worktree.h | 2 | ||||
| -rw-r--r-- | wt-status.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/worktree.c b/worktree.c index d874e23b4e..340b4ed777 100644 --- a/worktree.c +++ b/worktree.c @@ -66,7 +66,7 @@ static int is_current_worktree(struct worktree *wt) return is_current; } -struct worktree *get_worktree_from_repository(struct repository *repo) +struct worktree *get_current_worktree(struct repository *repo) { struct worktree *wt = xcalloc(1, sizeof(*wt)); char *gitdir = absolute_pathdup(repo->gitdir); diff --git a/worktree.h b/worktree.h index d19ec29dbb..1075409f9a 100644 --- a/worktree.h +++ b/worktree.h @@ -42,7 +42,7 @@ struct worktree **get_worktrees_without_reading_head(void); * Construct a struct worktree corresponding to repo->gitdir and * repo->worktree. */ -struct worktree *get_worktree_from_repository(struct repository *repo); +struct worktree *get_current_worktree(struct repository *repo); /* * Returns 1 if linked worktrees exist, 0 otherwise. diff --git a/wt-status.c b/wt-status.c index 479ccc3304..c12fca7078 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1827,7 +1827,7 @@ void wt_status_get_state(struct repository *r, struct stat st; struct object_id oid; enum replay_action action; - struct worktree *wt = get_worktree_from_repository(r); + struct worktree *wt = get_current_worktree(r); if (!stat(git_path_merge_head(r), &st)) { wt_status_check_rebase(wt, state); |
