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

Re: Pick the right default and stop warn on `git pull`

From
Theodore Y. Ts'o <tytso@mit.edu>
Date
Nov 23, 2020, 20:20 UTC
Message-ID
<20201123202003.GB132317@mit.edu>
In-Reply-To
<CAMP44s3cKVxKa0gOPfi3XRKbGbV=DweFE5pL0HM+v0kECFyPWA@mail.gmail.com>
On Mon, Nov 23, 2020 at 01:40:38PM -0600, Felipe Contreras wrote:
Show 14 quoted lines
> On Mon, Nov 23, 2020 at 1:17 PM Theodore Y. Ts'o <tytso@mit.edu> wrote:
> 
> > If your repository is effectively a leaf repo, then rebasing may be
> > harmless, although there are still who don't like rebasing because it
> > invalidates your previous testing.  My personal preference is to do a
> > git fetch, followed by a git merge --ff-only, and if that errors out,
> > then I know I need to take a bit more care before deciding what to do
> > next.
> 
> Which is why I suggested to make fast-forward-only the default:
> 
> https://lore.kernel.org/git/1398988808-29678-1-git-send-email-felipe.contreras@gmail.com/
> 
> In what case would that default not be what most people want?

Well, it *was* the default, previously, IIRC. The problem is that for "simple" use cases, using rebases for git-pull is "simpler". Well, it's simpler until it does something super-surprising when the project becomes more complex, but if the goal is to have a more gentle learning curve for newbies, especially for small projects --- which are the vast majority of projectds, on, say github and sourceforge --- the case can be made.

So intead of having a huge discussion which is going to be very hard to come to converge (much like the "main" vs "master" question), requiring people to set their own global default or per-repo default is a pretty good compromise.

						- Ted
Previous: Felipe ContrerasNext: Felipe Contreras
Message 5 of 29 in “Pick the right default and stop warn on `git pull`”
  1. Vít OndruchNov 23, 2020
  2. Alex HenrieNov 23, 2020
  3. Theodore Y. Ts'oNov 23, 2020
  4. Felipe ContrerasNov 23, 2020
  5. Theodore Y. Ts'oNov 23, 2020
  6. Felipe ContrerasNov 23, 2020
  7. Jeff KingNov 23, 2020
  8. Alex HenrieNov 23, 2020
  9. Jeff KingNov 24, 2020
  10. Junio C HamanoNov 23, 2020
  11. Felipe ContrerasNov 23, 2020
  12. Jeff KingNov 24, 2020
  13. Felipe ContrerasNov 24, 2020
  14. Jeff KingNov 24, 2020
  15. Junio C HamanoNov 24, 2020
  16. Jeff KingNov 24, 2020
  17. Felipe ContrerasNov 24, 2020
  18. Jeff KingNov 24, 2020
  19. Felipe ContrerasNov 24, 2020
  20. Jeff KingNov 24, 2020
  21. Vít OndruchNov 24, 2020
  22. Alex HenrieNov 24, 2020
  23. Felipe ContrerasNov 24, 2020
  24. Alex HenrieNov 24, 2020
  25. Junio C HamanoNov 25, 2020
  26. Felipe ContrerasNov 26, 2020
  27. Junio C HamanoNov 23, 2020
  28. Felipe ContrerasNov 23, 2020
  29. Felipe ContrerasNov 23, 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.