Re: [PATCH v2 02/14] pull: improve default warning
On Fri, Dec 4, 2020 at 6:56 PM Elijah Newren <newren@gmail.com> wrote:
Show 38 quoted lines
> > > > diff --git a/builtin/pull.c b/builtin/pull.c
> > > > index 1034372f8b..22a9ffcade 100644
> > > > --- a/builtin/pull.c
> > > > +++ b/builtin/pull.c
> > > > @@ -346,17 +346,18 @@ static enum rebase_type config_get_rebase(void)
> > > >
> > > > if (opt_verbosity >= 0 && !opt_ff) {
> > > > advise(_("Pulling without specifying how to reconcile divergent branches is\n"
> > > > - "discouraged. You can squelch this message by running one of the following\n"
> > > > - "commands sometime before your next pull:\n"
> > > > - "\n"
> > > > - " git config pull.rebase false # merge (the default strategy)\n"
> > > > - " git config pull.rebase true # rebase\n"
> > > > - " git config pull.ff only # fast-forward only\n"
> > > > - "\n"
> > > > - "You can replace \"git config\" with \"git config --global\" to set a default\n"
> > > > - "preference for all repositories. You can also pass --rebase, --no-rebase,\n"
> > > > - "or --ff-only on the command line to override the configured default per\n"
> > > > - "invocation.\n"));
> > > > + "discouraged; you need to specify if you want a merge, or a rebase.\n"
> > >
> > > ...want a merge, a rebase, or neither.
> >
> > There is no "git pull --no-merge". Years ago some people argued for a
> > "pull.mode=none" (essentially making "git pull" the same as "git
> > fetch"). But right now there's no option to do that.
> >
> > There's an option to do --ff-only, but that's still a merge.
>
> I disagree. I'm well aware that checkout_fast_forward() (which is
> what is ultimately called to do the fast-forwarding) is in a file
> called merge.c, but that doesn't make it a merge. I don't believe it
> was anything more than a convenient place to dump some extra code at
> the time.
>
> > Perhaps: a merge, a rebase, or a fast-forward?
>
> Sure, that works; in fact, that's much better than my suggestion. I like it.Actually no. If we are talking about divergent branches you cannot fast-forward.
The original text was fine.
--
Felipe Contreras