worktree: drop get_worktrees() unused 'flags' argument

get_worktrees() accepts a 'flags' argument, however, there are no
existing flags (the lone flag GWT_SORT_LINKED was recently retired) and
no behavior which can be tweaked. Therefore, drop the 'flags' argument.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Eric Sunshine
2020-06-19 19:35:44 -04:00
committed by Junio C Hamano
parent d9c54c2bbf
commit 03f2465bb1
11 changed files with 19 additions and 19 deletions

View File

@ -123,7 +123,7 @@ static void mark_current_worktree(struct worktree **worktrees)
free(git_dir);
}
struct worktree **get_worktrees(unsigned flags)
struct worktree **get_worktrees(void)
{
struct worktree **list = NULL;
struct strbuf path = STRBUF_INIT;
@ -398,7 +398,7 @@ const struct worktree *find_shared_symref(const char *symref,
if (worktrees)
free_worktrees(worktrees);
worktrees = get_worktrees(0);
worktrees = get_worktrees();
for (i = 0; worktrees[i]; i++) {
struct worktree *wt = worktrees[i];
@ -559,7 +559,7 @@ int other_head_refs(each_ref_fn fn, void *cb_data)
struct worktree **worktrees, **p;
int ret = 0;
worktrees = get_worktrees(0);
worktrees = get_worktrees();
for (p = worktrees; *p; p++) {
struct worktree *wt = *p;
struct object_id oid;