git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Alex Henrie <alexhenrie24@gmail.com>
Date
Sep 23, 2020, 18:25 UTC
Message-ID
<CAMMLpeRD6hKuAHjHh2AXrx1PVXHx7m9haUPAR_uNHR=YuT5xbQ@mail.gmail.com>
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:
Show 13 quoted lines
>
> 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
Previous: Junio C HamanoNext: Alex Henrie
Message 3 of 4 in “pull: do not warn when opt_ff is explicitly specified”
  1. pull: do not warn when opt_ff is explicitly specifiedDenton Liu, Sep 23, 2020
  2. Junio C HamanoSep 23, 2020
  3. Alex HenrieSep 23, 2020
  4. Alex HenrieSep 23, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.