Skip to content

nd/worktree-list-fixup

Nguyễn Thái Ngọc Duy git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v13 patches 8 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5worktree.c: zero new 'struct worktree' on allocationworktree.c+2 -120 replies
2/5worktree: reorder an if statementbuiltin/worktree.c+3 -30 replies
3/5get_worktrees() must return main worktree as first item even on errorbuiltin/worktree.c t/t2027-worktree-list.sh worktree.c+28 -90 replies
4/5worktree.c: get_worktrees() takes a new flag argumentbranch.c builtin/branch.c builtin/worktree.c +2 more+8 -80 replies
5/5worktree list: keep the list sortedbuiltin/worktree.c t/t2027-worktree-list.sh worktree.c +1 more+36 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] nd/worktree-list-fixup

This version

* changes get_worktrees() to take a flag, and adds one flag for sorting.

* adds tests for both the 'main worktree always present' and the sorting problems.

* reworks 3/5 a bit, keep changes closer, easier to see the cause and consequence.

Nguyễn Thái Ngọc Duy (5):
worktree.c: zero new 'struct worktree' on allocation
worktree: reorder an if statement
get_worktrees() must return main worktree as first item even on error worktree.c: get_worktrees() takes a new flag argument worktree list: keep the list sorted

 branch.c                 |  2 +-
 builtin/branch.c         |  2 +-
 builtin/worktree.c       | 14 ++++++++------
 t/t2027-worktree-list.sh | 40 ++++++++++++++++++++++++++++++++++++++++
 worktree.c               | 42 +++++++++++++++++++++---------------------
 worktree.h               |  4 +++-
 6 files changed, 74 insertions(+), 30 deletions(-)
Signature · 1 line
2.8.2.524.g6ff3d78