Thread (1 message) 1 message, 1 author, 2022-06-08

Re: [PATCH v2 6/7] sequencer: implement 'update-refs' command

From: Junio C Hamano <hidden>
Date: 2022-06-08 02:15:59

"Derrick Stolee via GitGitGadget" [off-list ref] writes:
From: Derrick Stolee <redacted>

The previous change allowed 'git rebase --update-refs' to create 'label'
commands for each branch  among the commits being rewritten and add an
'update-refs' command at the end of the todo list. Now, teach Git to
update the refs during that final 'update-refs' command.

We need to create an array of new and old OIDs for each ref by iterating
over the refs/rewritten/for-update-refs/ namespace. We cannot update the
refs in-place since this will confuse the refs iterator.
In other words, grab everything we need to do and then use that
in-core information to tell refs API what refs to change to what
values?  That dounds like a quite reasonable thing to do.

Looking at the patch text, the only thing that stands out at me is
that this does not seem to perform the updates in a single
transaction, which may often not matter in practice, but may be a
prudent thing to do anyway at philosophical level.

Thanks, will queue.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help