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