worktree list: keep the list sorted
It makes it easier to write tests for. But it should also be good for the user since locating a worktree by eye would be easier once they notice this. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
4fff1ef7ff
commit
4df1d4d466
@ -447,7 +447,7 @@ static int list(int ac, const char **av, const char *prefix)
|
||||
if (ac)
|
||||
usage_with_options(worktree_usage, options);
|
||||
else {
|
||||
struct worktree **worktrees = get_worktrees(0);
|
||||
struct worktree **worktrees = get_worktrees(GWT_SORT_LINKED);
|
||||
int path_maxlen = 0, abbrev = DEFAULT_ABBREV, i;
|
||||
|
||||
if (!porcelain)
|
||||
|
Reference in New Issue
Block a user