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

Trivial merge