aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2026-03-30 13:18:20 +0200
committerJunio C Hamano <gitster@pobox.com>2026-03-30 12:52:40 -0700
commit80871f356e88d23cc32cd852fd4a4548e861f47c (patch)
tree20b6dfb47515d3ce2c0a5c10ae4d387639ecc727 /builtin
parent5361983c075154725be47b65cca9a2421789e410 (diff)
downloadgit-80871f356e88d23cc32cd852fd4a4548e861f47c.tar.xz
t5516: test updateInstead with worktree and unborn bare HEAD
This is a regression test which should presently fail, to demonstrate the behavior I encountered that looks like a bug. When a bare repository has a worktree checked out on a separate branch, receive.denyCurrentBranch=updateInstead should allow a push to that branch and update the linked worktree, as long as the linked worktree is clean. But, if the bare repository's own HEAD is repointed to an unborn branch, the push is rejected with "Working directory has staged changes", even though the linked worktree itself is clean. This test is essentially a minimal working example of what I encountered while actually using Git; it might not be the optimal way to demonstrate the underlying bug. I suspect builtin/receive-pack.c is using the bare repository's HEAD even when comparing it to the worktree's index. Signed-off-by: Runxi Yu <me@runxiyu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
0 files changed, 0 insertions, 0 deletions