summaryrefslogtreecommitdiff
path: root/replace-object.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-11-20 08:51:33 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-21 07:59:15 +0900
commitc0b9cf3b55e9e1d6ea2d848bae1f8efe67b3b61b (patch)
tree503ec038438cf2794935b4a1e7e05c55b4eab251 /replace-object.c
parent1c299d03e5551847533019aa32863d2cbe589c7f (diff)
refs/files: support symbolic and root refs in initial transaction
The "files" backend has implemented special logic when committing the first transactions in an otherwise empty ref store: instead of writing all refs as separate loose files, it instead knows to write them all into a "packed-refs" file directly. This is significantly more efficient than having to write each of the refs as separate "loose" ref. The only user of this optimization is git-clone(1), which only uses this mechanism to write regular refs. Consequently, the implementation does not know how to handle both symbolic and root refs. While fine in the context of git-clone(1), this keeps us from using the mechanism in more cases. Adapt the logic to also support symbolic and root refs by using a second transaction that we use for all of the refs that need to be written as loose refs. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'replace-object.c')
0 files changed, 0 insertions, 0 deletions