On Thu, Nov 24, 2016 at 12:16 AM, Junio C Hamano wrote:
> More importantly, perhaps get_worktrees() should learn to take an
> optional pointer to int that returns how many items are in the list?
My first thought was "yeah I remember there are many counting loop
like this" then grepped and realize
Nguyễn Thái Ngọc Duy writes:
> + for (i = nr = 0; worktrees[i]; i++)
> + nr++;
> +
> + /*
> + * don't sort the first item (main worktree), which will
> + * always be the first
> + */
> + QSORT(worktree
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
---
builtin/worktree.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a
3 matches
Mail list logo