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
Alex Henrie <alexhenrie24@gmail.com>
Date
Dec 11, 2020, 20:38 UTC
Message-ID
<CAMMLpeQA7VW_C4yw_8n6j_SCoGr8k4VUOUaEp98UxUAMR6-MVw@mail.gmail.com>
In-Reply-To
<xmqqmtyviq9e.fsf@gitster.c.googlers.com>
On Wed, Dec 2, 2020 at 7:21 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
>
> 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, and not add any new config variables or substantially change the semantics of the existing ones. 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.

I am glad to see so much discussion surrounding the behavior of and documentation for `git pull`, but unfortunately at this point I'm having trouble following the discussion as a whole. I'm hoping that it settles down some so that it becomes more clear what I can do to help.

-Alex
Previous: Felipe ContrerasNext: Felipe Contreras
Message 17 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.