summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2025-01-26 23:02:11 +0100
committerJunio C Hamano <gitster@pobox.com>2025-01-27 08:16:47 -0800
commit93dc16483a312b77c0b6533a6c2705d1df3e3687 (patch)
treeb2e3d1793a7ea6b7bcdb31d867ca58ad0847a140 /commit-graph.c
parent638060dcb95ed7ef3b2f6e6038ac12744d8ba238 (diff)
fetch set_head: fix non-mirror remotes in bare repositories
In b1b713f722 (fetch set_head: handle mirrored bare repositories, 2024-11-22) it was implicitly assumed that all remotes will be mirrors in a bare repository, thus fetching a non-mirrored remote could lead to HEAD pointing to a non-existent reference. Make sure we only overwrite HEAD if we are in a bare repository and fetching from a mirror. Otherwise, proceed as normally, and create refs/remotes/<nonmirrorremote>/HEAD instead. Reported-by: Christian Hesse <list@eworm.de> Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions