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

From: Junio C Hamano <[email-masked]>
Date: Tue, 07 Jun 2022 15:23:08 -0700

"Derrick Stolee via GitGitGadget" <[email-masked]> writes:

> From: Derrick Stolee <[email-masked]>
>
> 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.