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)
commit430fd1cae522d1eff58478eb606bee996b52208f
treeeaccc302090ec4c03de9481cbfd542879b072d9f
parent3075e40c75560d93b569d1bba715008ca734ad83
parent4df1d4d4666eb26b420d5b386010470729846b8c
Merge branch 'nd/worktree-list-fixup' into maint

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