diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-12-16 15:27:48 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-16 15:27:48 -0800 |
commit | 2cf8c9053afbb666dc30f384d313e3e85e00d53a (patch) | |
tree | fd01ddd420738378def4893a367ea88441aa348c /branch.c | |
parent | 7e73488b46b317eea289373eed15086feb0cd959 (diff) | |
parent | 4df1d4d4666eb26b420d5b386010470729846b8c (diff) | |
download | git-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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++) { |