diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2025-01-26 23:02:11 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-01-27 08:16:47 -0800 |
commit | 93dc16483a312b77c0b6533a6c2705d1df3e3687 (patch) | |
tree | b2e3d1793a7ea6b7bcdb31d867ca58ad0847a140 /commit-graph.c | |
parent | 638060dcb95ed7ef3b2f6e6038ac12744d8ba238 (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