summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-16 15:27:48 -0800
committerJunio C Hamano <gitster@pobox.com>2016-12-16 15:27:48 -0800
commit2cf8c9053afbb666dc30f384d313e3e85e00d53a (patch)
treefd01ddd420738378def4893a367ea88441aa348c /branch.c
parent7e73488b46b317eea289373eed15086feb0cd959 (diff)
parent4df1d4d4666eb26b420d5b386010470729846b8c (diff)
downloadgit-2cf8c9053afbb666dc30f384d313e3e85e00d53a.tar.gz
Merge branch 'nd/worktree-list-fixup'
The output from "git worktree list" was made in readdir() order, and was unstable. * nd/worktree-list-fixup: worktree list: keep the list sorted worktree.c: get_worktrees() takes a new flag argument get_worktrees() must return main worktree as first item even on error worktree: reorder an if statement worktree.c: zero new 'struct worktree' on allocation
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/branch.c b/branch.c
index 0d459b3cfe..c431cbf6a9 100644
--- a/branch.c
+++ b/branch.c
@@ -348,7 +348,7 @@ void die_if_checked_out(const char *branch, int ignore_current_worktree)
int replace_each_worktree_head_symref(const char *oldref, const char *newref)
{
int ret = 0;
- struct worktree **worktrees = get_worktrees();
+ struct worktree **worktrees = get_worktrees(0);
int i;
for (i = 0; worktrees[i]; i++) {