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

Re: [PATCH v7 1/1] pull: add ff-only option

From
Raymond E. Pasco <ray@ameretat.dev>
Date
Nov 24, 2020, 00:32 UTC
Message-ID
<C7B2K1BLPDIO.1D6XVJIWIG3UZ@ziyou.local>
In-Reply-To
<CAMP44s0r1vf7x-wHP-b6KQRU7mcPSZzcMRK2VqqxU_SJRDs+kg@mail.gmail.com>
On Mon Nov 23, 2020 at 7:08 PM EST, Felipe Contreras wrote:
Show 8 quoted lines
> I'd have no objection in refactoring this option so it's used for
> both, but this breaks existing behavior. A user that has
> "pull.ff=only", and does a "git pull --rebase" might expect it to
> work.
>
> My main interest is what happens when the user has not configured
> anything, which I defined with a "push.mode=default", any option (e.g.
> --rebase/--merge) would override that default.

I feel like the parsimonious change to make is simply defaulting the existing "pull.ff" to "only". I think someone who has set "pull.rebase" expects pull --rebase behavior just as much as someone who passes --rebase on the command line. The issue in question is what someone who has not made any changes to the settings expects to happen with a plain "git pull", and I certainly agree that people who are not power users expect a fast-forward (I try not to force my opinions on workflow or style when onboarding people to Git, but I do always recommend "pull.ff=only" because I know this is a perennial pitfall).

The problem is that, as it stands now, this would just leave the user with a cryptic error message ("Not possible to fast-forward, aborting") when they wanted to see remote changes. I think this might warrant an even more expanded message than the short one in this patch, but I'm not sure exactly what it should say - there are a few things the user might expect, but an error message isn't the best place for a crash course.

Previous: Felipe ContrerasNext: Alex Henrie
Message 9 of 11 in “Reject non-ff pulls by default”
  1. 0/1 Reject non-ff pulls by defaultFelipe Contreras, Nov 23, 2020
  2. 1/1 pull: add ff-only optionFelipe Contreras, Nov 23, 2020
  3. Felipe ContrerasNov 23, 2020
  4. Alex HenrieNov 23, 2020
  5. Junio C HamanoNov 23, 2020
  6. Felipe ContrerasNov 23, 2020
  7. Jeff KingNov 24, 2020
  8. Felipe ContrerasNov 24, 2020
  9. Raymond E. PascoNov 24, 2020
  10. Alex HenrieNov 24, 2020
  11. Felipe ContrerasNov 24, 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.