git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Rebase options via git pull

From
Sergey Organov <sorganov@gmail.com>
Date
May 15, 2021, 07:39 UTC
Message-ID
<87r1i8fnsw.fsf@osv.gnss.ru>
In-Reply-To
<8735upsmg9.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 49 quoted lines
> On Fri, May 14 2021, Junio C Hamano wrote:
>
>> Sergey Organov <sorganov@gmail.com> writes:
>>
>>> Is there a way to specify additional options for "git rebase" when it's
>>> invoked via:
>>>
>>>   git pull --rebase
>>>
>>> ? What if rebase is used implicitly due to "pull.rebase" being set
>>> accordingly?
>>>
>>> In particular, I'd like to be able to:
>>>
>>>   git pull --rebase --no-fork-point
>>>
>>> but it doesn't work.
>>>
>>> From documentation is looks like "git pull --rebase" is still a
>>> second-class citizen. There is whole section about merge options in the
>>> manual, and none about rebase options.
>>
>> Yeah, it does feel like so.
>>
>> Just like we can pass merge-strategy specific options via -X<opt>=<val>,
>> e.g.
>>
>>     $ git pull -Xsubtree=gitk git://ozlabs.org/~paulus/gitk.git
>>
>> to ask the command to invoke "git merge -Xsubtree=gitk" after
>> fetching from the remote repository, we should allow rebase specific
>> options via a similar mechanism, e.g. -Yno-fork-point=yes (or
>> something along that line---exact syntax does not matter).
>>
>> But I do not think there currently is anything like that.
>
> It seems much cleaner to do a bit of refactoring of their respective
> parse options specs to have "pull" understand the relevant subset of
> rebase or merge options depending on its mode, we do something similar
> in "rebase" depending on the "rebase stage" you're in.
>
> That has the added benefit over your suggestion of us catching any error
> in the passed option right away, as opposed to finding you typo'd
> -Xno-spork-point when we get to running "rebase".
>
> We also probably want to lib-ify the rebase logic enough that "pull" can
> run it directly without spawning another process eventually, at that
> point borrowing this "pass arg as-is to the driver program" syntax would
> become even weirder.
This sounds much better indeed!

To add to the issue, there has always been confusion that in case of conflicts one should either do:

   git merge --continue
or:
  git rebase --continue
depending on current configuration. So
  git pull --continue
would be much appreciated, I think.

Thanks, Sergey Organov

Previous: Ævar Arnfjörð BjarmasonNext: Alex Henrie
Message 4 of 13 in “Rebase options via git pull”
  1. Sergey OrganovMay 13, 2021
  2. Junio C HamanoMay 13, 2021
  3. Ævar Arnfjörð BjarmasonMay 14, 2021
  4. Sergey OrganovMay 15, 2021
  5. Alex HenrieMay 14, 2021
  6. Đoàn Trần Công DanhMay 14, 2021
  7. Alex HenrieMay 14, 2021
  8. Sergey OrganovMay 14, 2021
  9. Ævar Arnfjörð BjarmasonMay 17, 2021
  10. Sergey OrganovMay 17, 2021
  11. Đoàn Trần Công DanhMay 17, 2021
  12. Sergey OrganovMay 17, 2021
  13. Đoàn Trần Công DanhMay 17, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.