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
@ -15,6 +15,8 @@ struct worktree {
|
||||
|
||||
/* Functions for acting on the information about worktrees. */
|
||||
|
||||
#define GWT_SORT_LINKED (1 << 0) /* keeps linked worktrees sorted */
|
||||
|
||||
/*
|
||||
* Get the worktrees. The primary worktree will always be the first returned,
|
||||
* and linked worktrees will be pointed to by 'next' in each subsequent
|
||||
|
Reference in New Issue
Block a user