git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Henrie <alexhenrie24@gmail.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] pull: do not warn when opt_ff is explicitly specified
Date: Wed, 23 Sep 2020 12:25:55 -0600	[thread overview]
Message-ID: <CAMMLpeRD6hKuAHjHh2AXrx1PVXHx7m9haUPAR_uNHR=YuT5xbQ@mail.gmail.com> (raw)
In-Reply-To: <1093128c646b154a14d89321454f5361c0e616b4.1600854717.git.liu.denton@gmail.com>

On Wed, Sep 23, 2020 at 3:56 AM Denton Liu <liu.denton@gmail.com> wrote:
>
> In d18c950a69 (pull: warn if the user didn't say whether to rebase or to
> merge, 2020-03-09), `git pull` was taught to warn users if they
> have `pull.rebase` unset or `pull.ff != "only"`. However, this warning
> is a little too eager about happening.
>
> If the warning is silenced by specifying `pull.ff = "only"`, as
> instructed, the warning will arise again if the user runs
> something like `git pull --no-ff`. However, the warning should not
> happen as the user clearly knows what they're doing.
>
> Don't display the warning if opt_ff is explicitly set by a command-line
> option given by a user.

Hi Denton, thanks for working on this! We can also assume that the
user knows what they are doing and does not need a warning if they
have run `git config --global pull.ff no`. So really, we can just get
rid of the check for strcmp(opt_ff, "--ff-only") altogether and
instead only check !opt_ff. Could you do that and add some more tests
to t5521-pull-options.sh?

-Alex

  parent reply	other threads:[~2020-09-23 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23  9:56 [PATCH] pull: do not warn when opt_ff is explicitly specified Denton Liu
2020-09-23 16:40 ` Junio C Hamano
2020-09-23 18:25 ` Alex Henrie [this message]
2020-09-23 18:33   ` Alex Henrie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMMLpeRD6hKuAHjHh2AXrx1PVXHx7m9haUPAR_uNHR=YuT5xbQ@mail.gmail.com' \
    --to=alexhenrie24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).