Skip to content

receive-pack: fix HEAD check for updateInstead

Pablo Sabater git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3t5516: test updateInstead with worktree and unborn bare HEADt/t5516-fetch-push.sh+18 -00 replies
2/3t5516: clean up cloned and new-wt in denyCurrentBranch and worktrees testt/t5516-fetch-push.sh+1 -00 replies
3/3receive-pack: use worktree HEAD for updateInsteadbuiltin/receive-pack.c t/t5516-fetch-push.sh+16 -290 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [GSoC PATCH 0/3] receive-pack: fix HEAD check for updateInstead

When a bare repo has linked worktrees, and its HEAD points to an unborn branch, pushing to a wt branch with updateInstead fails and rejects the push, even if the wt is clean.

This happens because HEAD is checked only for the bare repo context, instead of the wt.

This series includes Runxi's test, a cleanup of a test that messes with Runxi's test and the fix for the issue.

Pablo Sabater (2):
t5516: clean up cloned and new-wt in denyCurrentBranch and worktrees
test
receive-pack: use worktree HEAD for updateInstead

Runxi Yu (1):
t5516: test updateInstead with worktree and unborn bare HEAD

 builtin/receive-pack.c | 39 +++++++++++++++------------------------
 t/t5516-fetch-push.sh  | 15 +++++++++++++++
 2 files changed, 30 insertions(+), 24 deletions(-)

base-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71

Signature · 1 line
2.43.0