worktree.c: get_worktrees() takes a new flag argument
This is another no-op patch, in preparation for get_worktrees() to do optional things, like sorting. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a234563a3b
commit
4fff1ef7ff
@ -160,7 +160,7 @@ static void mark_current_worktree(struct worktree **worktrees)
|
||||
free(git_dir);
|
||||
}
|
||||
|
||||
struct worktree **get_worktrees(void)
|
||||
struct worktree **get_worktrees(unsigned flags)
|
||||
{
|
||||
struct worktree **list = NULL;
|
||||
struct strbuf path = STRBUF_INIT;
|
||||
@ -327,7 +327,7 @@ const struct worktree *find_shared_symref(const char *symref,
|
||||
|
||||
if (worktrees)
|
||||
free_worktrees(worktrees);
|
||||
worktrees = get_worktrees();
|
||||
worktrees = get_worktrees(0);
|
||||
|
||||
for (i = 0; worktrees[i]; i++) {
|
||||
struct worktree *wt = worktrees[i];
|
||||
|
Reference in New Issue
Block a user