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

Re: [PATCH] rebase: add a config option for --no-fork-point

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2021, 22:27 UTC
Message-ID
<xmqqo8hiaptn.fsf@gitster.c.googlers.com>
In-Reply-To
<CAMMLpeQM7JCP0=TMqf0DxDCVJvkCGDEPSKN6vYTU_xc7+QaA1Q@mail.gmail.com>
Alex Henrie <alexhenrie24@gmail.com> writes:
Show 17 quoted lines
>> > -     if (options.root && fork_point > 0)
>> > +     if (options.root && options.fork_point > 0)
>> >               die(_("cannot combine '--root' with '--fork-point'"));
>>
>> Is that because of this code?
>
> Yes. I was trying to avoid annoying the user with errors when
> rebase.forkPoint is set to "true" and --root is given on the command
> line.
>
>> If so, perhaps the configuration parser should set the .fork_point
>> to (-1), so that "[rebase] forkpoint = false" that appears in your
>> ~/.gitconfig file can be countermanded with "[rebase] forkpoint"
>> that is placed in .git/config for one particular project that you do
>> not mind using the feature?
>
> That's a great point. I will make that change and resubmit. Thanks!

By the way, is the feature itself something we can test easily? I think I saw the "we must interact with --root sensibly" test, but the actual feature not being tested include

 - rebase.forkpoint set to false and then to true; does it use the
   fork-point feature (your patch as-is would have failed this test);
 - rebase.forkpoint set to false and command line says --fork-point;
 - rebase.forkpoint set to true and command line says --no-fork-point;

I offhand do not know if it is easy to observe it the fork-point feature gets triggered, but it seems that the difference in behaviour is big enough for you to care, so I am hoping you may think of a way.

Thanks.
Previous: Alex HenrieNext: Alex Henrie
Message 4 of 9 in “rebase: add a config option for --no-fork-point”
  1. rebase: add a config option for --no-fork-pointAlex Henrie, Jan 20, 2021
  2. Junio C HamanoJan 20, 2021
  3. Alex HenrieJan 20, 2021
  4. Junio C HamanoJan 21, 2021
  5. Alex HenrieJan 21, 2021
  6. Denton LiuJan 21, 2021
  7. Alex HenrieJan 21, 2021
  8. Junio C HamanoFeb 18, 2021
  9. Alex HenrieFeb 20, 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.