Skip to content

protect branches checked out in all worktrees

Anders Kaseorg git 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest8 patches 11 repliesIn review
  2. v68 patches 12 repliesSuperseded
  3. v54 patches 10 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v44 patches10 repliesSuperseded
v32 patches9 repliesSuperseded
v21 patch5 repliesSuperseded
v11 patch0 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8fetch: lowercase error messagesbuiltin/fetch.c+26 -240 replies
2/8receive-pack: lowercase error messagesbuiltin/receive-pack.c t/t5504-fetch-receive-strict.sh+6 -60 replies
3/8branch: lowercase error messagesbranch.c t/t2018-checkout-branch.sh t/t3200-branch.sh+13 -130 replies
4/8worktree: simplify find_shared_symref() memory ownership modelbranch.c builtin/branch.c builtin/notes.c +3 more+65 -386 replies
5/8fetch: protect branches checked out in all worktreesbuiltin/fetch.c t/t5516-fetch-push.sh+58 -352 replies
6/8receive-pack: clean dead code from update_worktree()builtin/receive-pack.c+7 -160 replies
7/8receive-pack: protect current branch for bare repository worktreebuiltin/receive-pack.c t/t5516-fetch-push.sh+17 -50 replies
8/8branch: protect branches checked out in all worktreesbranch.c t/t3200-branch.sh+16 -43 replies

Reviews trailers per patch

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

Read the v7 thread

Cover letter [PATCH v7 0/8] protect branches checked out in all worktrees

‘git fetch’ (without ‘--update-head-ok’), ‘git receive-pack’, and ‘git branch -M’ protect the currently checked out branch from being accidentally updated. However, the code for these checks predates ‘git worktree’. Improve it to protect branches checked out in all worktrees, not just the current one.

Anders Kaseorg (8):
fetch: lowercase error messages
receive-pack: lowercase error messages
branch: lowercase error messages
worktree: simplify find_shared_symref() memory ownership model
fetch: protect branches checked out in all worktrees
receive-pack: clean dead code from update_worktree()
receive-pack: protect current branch for bare repository worktree
branch: protect branches checked out in all worktrees

 branch.c                        |  45 +++++++-----
 builtin/branch.c                |   7 +-
 builtin/fetch.c                 | 119 +++++++++++++++++---------------
 builtin/notes.c                 |   6 +-
 builtin/receive-pack.c          |  92 +++++++++++++-----------
 t/t2018-checkout-branch.sh      |   2 +-
 t/t3200-branch.sh               |  11 ++-
 t/t5504-fetch-receive-strict.sh |   2 +-
 t/t5516-fetch-push.sh           |  32 +++++++++
 worktree.c                      |   8 +--
 worktree.h                      |   5 +-
 11 files changed, 198 insertions(+), 131 deletions(-)
Signature · 1 line
2.34.1