Merge branch 'nd/worktree-list-fixup' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 Jan 2017 22:49:27 +0000 (14:49 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Jan 2017 22:49:27 +0000 (14:49 -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