Re: [PATCH] pull: do not warn when opt_ff is explicitly specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 23, 2020 at 3:56 AM Denton Liu <liu.denton@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux