Re: [PATCH v4 07/12] rebase: add --update-refs option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 19, 2022, 16:44 UTC
- Message-ID
- <xmqqo7xlaw7z.fsf@gitster.g>
- In-Reply-To
- <6b6746cb-2456-0733-32ed-c0a7a3f57087@github.com>
Derrick Stolee <derrickstolee@github.com> writes:
Show 19 quoted lines
> On 7/18/2022 3:35 PM, Junio C Hamano wrote: >> Derrick Stolee <derrickstolee@github.com> writes: >> >>> ... I think I should use "branches" here, but >>> keep the name "--update-refs". The biggest reason is that it provides >>> a nice parallel with the "update-ref" sequencer command. This command >>> allows updating _any_ ref, such as lightweight tags in refs/tags/* >>> or even refs in refs/my/namespace/*. >>> >>> The --update-refs option doesn't create the commands to update tags >>> or refs in places other than refs/heads/*. >> >> I guess it would make the choice of "branch" the most appropriate. >> >> I was hoping that we can repoint refs in private namespaces that are >> not branches with the option. But as long as the underlying >> "update-ref" instruction can be used by advanced users, that is OK. > > I would like to keep the --update-refs name for a couple reasons:
I do not think anybody proposed to change the name of that option.
I was reacting to your "I should use branches here", with the understanding that "here" is this place where you used "local refs".
>> + OPT_BOOL(0, "update-refs", &options.update_refs,
>> + N_("update local refs that point to commits "If "rebase --update-refs" uses "update-ref" insn (which is capable of repointing non-branch refs) only for local branches, then the help text for the "--update-refs" option can safely say "update local branches" without being inaccurate. That is where my "branch is the most appropriate" comes from.