aboutsummaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorPablo Sabater <pabloosabaterr@gmail.com>2026-03-30 13:18:22 +0200
committerJunio C Hamano <gitster@pobox.com>2026-03-30 12:52:41 -0700
commit8151f4fe7e4bf36f2656ae849a4ffaf386708178 (patch)
treed5135a2fa9927c81158639a258a1cffcc375f3ff /commit-graph.c
parentb310755ecaf4459eddd4f602b3cb02e793c01177 (diff)
downloadgit-8151f4fe7e4bf36f2656ae849a4ffaf386708178.tar.xz
receive-pack: use worktree HEAD 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. Remove head_has_history and check for worktree->head_oid which does have the correct HEAD of the wt. Update the test added by Runxi's patch to expect success. Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions