On Sat, Dec 5, 2020 at 7:01 PM Elijah Newren <newren@xxxxxxxxx> wrote: > > On Sat, Dec 5, 2020 at 1:28 PM Felipe Contreras > <felipe.contreras@xxxxxxxxx> wrote: > > > > On Sat, Dec 5, 2020 at 10:28 AM Elijah Newren <newren@xxxxxxxxx> wrote: > > > On Fri, Dec 4, 2020 at 5:56 PM Felipe Contreras > > > <felipe.contreras@xxxxxxxxx> wrote: > > > > > > Well, I already said I partly agree with you: in the --ff-only case > > > > the suggestion should not be brought forward. > > > > > > > > But in the "git pull" default case, *today* it's doing a merge. If > > > > uttering --merge and thus making the current behavior explicit instead > > > > of implicit seems dangerous it's because it is. But not documenting it > > > > doesn't make it any less dangerous. > > > > > > Sounds like we agree that the future should be ff-only-as-default. I > > > also agree with you that the primary problem is the current default > > > behavior, and I'll agree with you that documenting the current default > > > is okay. However, I disagree that your wording here: > > > > > > + "If unsure, run \"git pull --no-rebase\".\n" > > > > > > does anything of the sort. It does not mention that this is the > > > default behavior the users would get if they provided no flags. > > > > But that is not the warning, this is the warning: > > > > Pulling without specifying how to reconcile divergent branches is discouraged; > > you need to specify if you want a merge, a rebase, or a fast-forward. > > You can squelch this message by running one of the following commands: > > > > git config pull.rebase false # merge (the default strategy) > > git config pull.rebase true # rebase > > git config pull.ff only # fast-forward only > > > > You can replace "git config" with "git config --global" to set a default > > preference for all repositories. > > If unsure, run "git pull --merge". > > Read "git pull --help" for more information. > > > > This warning says: > > > > 1. There's 3 options: merge, rebase, fast-forward > > 2. merge is the default strategy > > 3. If unsure, specify --merge (the default strategy) > > > > So taken altogether it does say what is the default strategy. > > We don't need to take them together. No, but that's what I'm proposing. > #2 by itself states the default strategy. Yes, with configuration, not with commands. > I don't see why defending #3 as being for the purpose of > documenting the default strategy is helpful, since it doesn't do that. I disagree. It does do that, but it serves a more urgent purpose: it tells the user how to ignore us quickly, for now. > > The current warning should not exist at all. > > > > The complaint from Vít Ondruch [1] that reignited this series is a > > valid one. A *permanent* warning is not good. We should have a > > *temporary* warning with the express purpose of notifying users of an > > upcoming change. > > > > If we have not yet decided on what should be the default (Junio seems > > to have casted some doubt on the consensus [2]), and we don't have a > > Useful link there. Based on his comments, we may want to make > --ff-only, --merge, and --rebase all be mutually exclusive and result > in an error message if more than one is specified at the command line. > (But still have the command line countermand any option set in the > config, of course). Yes, but that's a change in behavior. Moreover, what do you suggest this should do? git -c "pull.rebase=true" -c "pull.ff=only" pull I have already tried to make pull.ff=only work in several ways. It's just not a clean solution. Cheers. -- Felipe Contreras