mirror of
https://github.com/git/git.git
synced 2026-05-25 11:25:06 +02:00
Merge branch 'pw/rename-to-get-current-worktree'
Code clean-up. * pw/rename-to-get-current-worktree: worktree: rename get_worktree_from_repository()
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user