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

Re: [RFC 2/2] pull: default pull.ff to "only" when pull.rebase is not set either

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 12, 2020, 01:08 UTC
Message-ID
<CAMP44s299UcdutpkSZsKFiwxUfj7n4SXTHw7A8rAWPS6iDJacg@mail.gmail.com>
In-Reply-To
<CAMMLpeQA7VW_C4yw_8n6j_SCoGr8k4VUOUaEp98UxUAMR6-MVw@mail.gmail.com>
On Fri, Dec 11, 2020 at 2:38 PM Alex Henrie <alexhenrie24@gmail.com> wrote:
Show 25 quoted lines
>
> On Wed, Dec 2, 2020 at 7:21 PM Junio C Hamano <gitster@pobox.com> wrote:
> >
> > So, the idea is that we currently return NULL when pull.ff is set,
> > but now we also check "pull.rebase" etc. and give "--ff-only" when
> > we did not choose --[no-]rebase and lack the configuration.  So the
> > default (i.e. when pull.ff and pull.rebase are not set) would be as
> > if the user said
> >
> >         git pull --ff-only --no-rebase
> >
> > I am not seeing what problem this tries to solve, exactly, though.
> >
> > I would have expected that for those who did not choose between
> > merge and rebase (either with the pull.rebase configuration or from
> > the command line --[no-]rebase option) the command would behave as
> > if --ff-only is given, regardless of how pull.ff configuration is
> > set.  That way, those who are unconfigured will just follow along
> > what happens at the upstream, until they have their own development,
> > at which point "--ff-only" can no longer be satisfied and their
> > "pull" would fail until they choose how to consolidate their work
> > with the upstream.
>
> My goal was to make `git pull` without arguments and without any
> configuration set (the most common case) reject non-fast-forwards,
This is what we all want, in my opinion.
> and not add any new config variables

But we need first to give users the ability to test this new mode with a configuration variable.

It's how we get there that we disagree.
> In my opinion it's fine that setting pull.ff
> would change the behavior of `git pull` without arguments; I don't
> think that that would be bad behavior.

No, it's not bad behavior. But we need to warn our users that this change is coming first, and how to try it out.

That's what I think.
Cheers.
-- 
Felipe Contreras
Previous: Alex Henrie
Message 18 of 18 in “[RFC 1/2] pull: warn that pulling will not merge by default in Git 3.0”
  1. Alex HenrieNov 25, 2020
  2. 2/2 pull: default pull.ff to "only" when pull.rebase is not set eitherAlex Henrie, Nov 25, 2020
  3. Felipe ContrerasNov 25, 2020
  4. Felipe ContrerasNov 25, 2020
  5. Philip OakleyNov 25, 2020
  6. Felipe ContrerasDec 2, 2020
  7. Junio C HamanoDec 3, 2020
  8. Felipe ContrerasDec 3, 2020
  9. Junio C HamanoDec 3, 2020
  10. Junio C HamanoDec 3, 2020
  11. Felipe ContrerasDec 3, 2020
  12. Jacob KellerDec 4, 2020
  13. Junio C HamanoDec 4, 2020
  14. Felipe ContrerasDec 4, 2020
  15. Junio C HamanoDec 4, 2020
  16. Felipe ContrerasDec 4, 2020
  17. Alex HenrieDec 11, 2020
  18. Felipe ContrerasDec 12, 2020

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.