Re: Pick the right default and stop warn on `git pull`
- From
Jeff King <peff@peff.net>
- Date
- Nov 24, 2020, 02:32 UTC
- Message-ID
- <X7xw0xb9UnGKbS8m@coredump.intra.peff.net>
- In-Reply-To
- <xmqqy2irjy4f.fsf@gitster.c.googlers.com>
On Mon, Nov 23, 2020 at 06:18:40PM -0800, Junio C Hamano wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes: > > > Ah, that's what I was missing. I agree it would be nice for it to behave > > consistently in both cases (though why one would set both pull.ff=only > > and pull.rebase=true, I don't know). > > So an obvious thing we could do, if pull.mode is too much of a > change, is to make "pull --rebase" codepath honor pull.ff as well, > perhaps? I.e. those who set pull.ff=only are saying that "please > stop me when I have any local change---I want to be notified if my > pull on this branch results in anything but a fast-forward from the > upstream". > > And then making an unconfigured pull.ff to default to pull.ff=only > may give a proper failure whether you merge or rebase. I dunno.
Yeah, I would be perfectly happy with that (and it's in fact what I _thought_ was happening before today's discussion).
I do wonder if anybody has set:
pull.rebase=true pull.ff=only
which would then refuse to rebase at all, and whether they would be annoyed. I am scratching my head over why one would do that, though. It is meaningful only if you usually rebase, but when you say "--no-rebase" you want to make sure you do not create a merge commit. Which seems weird.
-Peff