summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-01-03 07:22:13 +0100
committerJunio C Hamano <gitster@pobox.com>2024-01-03 09:54:20 -0800
commitd26c21483d327fdecb52a98be8239f0f224423f9 (patch)
tree386432457eb20c151d8c17aa389e8593f283702f /builtin/commit-graph.c
parent5809004f261e0468ae9c8bca83b600852e751920 (diff)
reftable/stack: do not overwrite errors when compacting
In order to compact multiple stacks we iterate through the merged ref and log records. When there is any error either when reading the records from the old merged table or when writing the records to the new table then we break out of the respective loops. When breaking out of the loop for the ref records though the error code will be overwritten, which may cause us to inadvertently skip over bad ref records. In the worst case, this can lead to a compacted stack that is missing records. Fix the code by using `goto done` instead so that any potential error codes are properly returned to the caller. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions