Merge branch 'nd/worktree-list-fixup'
commit2cf8c9053afbb666dc30f384d313e3e85e00d53a
authorJunio C Hamano <gitster@pobox.com>
Fri, 16 Dec 2016 23:27:48 +0000 (16 15:27 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Dec 2016 23:27:48 +0000 (16 15:27 -0800)
treefd01ddd420738378def4893a367ea88441aa348c
parent7e73488b46b317eea289373eed15086feb0cd959
parent4df1d4d4666eb26b420d5b386010470729846b8c
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