worktree add: worktree_basename() fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | worktree add: don't read out of bounds in worktree_basename()builtin/ | +3 | 0 replies | |
| 2/4 | worktree add: reject separator-only pathbuiltin/ t/ | +6 | 0 replies | |
| 3/4 | worktree add: trim slashes when deriving branch name from pathbuiltin/ t/ | +15 | 1 reply | |
| 4/4 | worktree add: let worktree_basename() return string copybuiltin/ | +10 | 4 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by.
| Patch | Matthias Aßhauer |
|---|---|
| 1/4 | Original-patch-by |
| 2/4 | Original-patch-by |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] worktree add: worktree_basename() fixes
Here's my take on solving the issues addressed by [1]. I'd prefer a reroll of that series, but in case it won't come we can use this one.
The first fix is the most important one, avoiding potential data loss. The third one starts to accept paths with trailing path separators, the fourth one simplifies the code.
worktree add: don't read out of bounds in worktree_basename() worktree add: reject separator-only path
worktree add: trim slashes when deriving branch name from path worktree add: let worktree_basename() return string copy
builtin/worktree.c | 33 ++++++++++++++------------------- t/t2400-worktree-add.sh | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 19 deletions(-)
[1] https://lore.kernel.org/git/[email protected]/
Signature · 1 line
2.55.0