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

Re: [PATCH 3/5] pull: handle conflicting rebase/merge options via last option wins

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jul 15, 2021, 17:46 UTC
Message-ID
<60f0747b149eb_4b682084c@natae.notmuch>
In-Reply-To
<xmqq7dhrtrc2.fsf@gitster.g>
Junio C Hamano wrote:
> "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
> > --- a/Documentation/config/pull.txt
> > +++ b/Documentation/config/pull.txt
Show 25 quoted lines
> >  pull.rebase::
> >  	When true, rebase branches on top of the fetched branch, instead
> >  	of merging the default branch from the default remote when "git
> >  	pull" is run. See "branch.<name>.rebase" for setting this on a
> > -	per-branch basis.
> > +	per-branch basis.  Incompatible with pull.ff.
> 
> Likewise.
> 
> I think it technically is OK to say "only ff update is allowed" or
> "ff update is allowed when able" while saying pull.rebase=yes.  
> 
>  - For those who say ff=only, the actual value of pull.rebase would
>    not matter (i.e. the integration immediately finishes by updating
>    to what was obtained from the upstream because there is no new
>    development on our own on top of theirs to either replay or
>    merge).
> 
>  - For those who merely allow ff, an update may fast-forward even
>    when pull.rebase is set to true (or any non-false value), while
>    we'll replay our own development on top of theirs when their
>    history is not descendent of ours.
> 
> So I do not see need to declare these combinations "incompatible".
> But perhaps I am missing some subtle cases?

Doing such a thing would be wrong. As I already explained multiple times, pull.rebase can be overriden by the command line. When doing --merge we want to honor pull.ff, when we don't we want to ignore it.

Since both Elijah and Junio have muted me, and they keep making these mistakes, can anybody else forward this point to them?

Cheers.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Elijah Newren
Message 8 of 26 in “Handle conflicting pull options”
  1. 0/5 Handle conflicting pull optionsElijah Newren via GitGitGadget, Jul 15, 2021
  2. 1/5 pull: move definitions of parse_config_rebase and parse_opt_rebaseElijah Newren via GitGitGadget, Jul 15, 2021
  3. 3/5 pull: handle conflicting rebase/merge options via last option winsElijah Newren via GitGitGadget, Jul 15, 2021
  4. Eric SunshineJul 15, 2021
  5. Elijah NewrenJul 15, 2021
  6. Felipe ContrerasJul 15, 2021
  7. Junio C HamanoJul 15, 2021
  8. Felipe ContrerasJul 15, 2021
  9. Elijah NewrenJul 15, 2021
  10. Junio C HamanoJul 15, 2021
  11. Elijah NewrenJul 15, 2021
  12. Junio C HamanoJul 15, 2021
  13. Elijah NewrenJul 16, 2021
  14. Junio C HamanoJul 16, 2021
  15. Felipe ContrerasJul 16, 2021
  16. Junio C HamanoJul 15, 2021
  17. Elijah NewrenJul 15, 2021
  18. 2/5 pull: convert OPT_PASSTHRU for fast-forward options to OPT_CALLBACKElijah Newren via GitGitGadget, Jul 15, 2021
  19. 4/5 pull: abort if --ff-only is given and fast-forwarding is impossibleAlex Henrie via GitGitGadget, Jul 15, 2021
  20. 5/5 pull: abort by default when fast-forwarding is not possibleElijah Newren via GitGitGadget, Jul 15, 2021
  21. Eric SunshineJul 15, 2021
  22. Elijah NewrenJul 15, 2021
  23. Felipe ContrerasJul 15, 2021
  24. Ævar Arnfjörð BjarmasonJul 16, 2021
  25. Felipe ContrerasJul 16, 2021
  26. Felipe ContrerasJul 15, 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.