summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-11-28 09:36:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-11-28 21:18:51 (GMT)
commit4df1d4d4666eb26b420d5b386010470729846b8c (patch)
tree3326149c4a7e8c3927d56e1f2a0e04ba0f19c1ee /builtin
parent4fff1ef7ffe0e370459242cf08c51177eeb4181f (diff)
downloadgit-4df1d4d4666eb26b420d5b386010470729846b8c.zip
git-4df1d4d4666eb26b420d5b386010470729846b8c.tar.gz
git-4df1d4d4666eb26b420d5b386010470729846b8c.tar.bz2
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index d7d195c..9a97e37 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -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)