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

Re: [PATCH v3] pull: warn if the user didn't say whether to rebase or to merge

From
Alex Henrie <alexhenrie24@gmail.com>
Date
Mar 1, 2020, 03:27 UTC
Message-ID
<CAMMLpeS2Fq3Nj2QjvNT6i_+ceDHW-pUqTRUhmARWen-jWQfsJg@mail.gmail.com>
In-Reply-To
<CABPp-BEewypPoDrWesk=6twgj2TMGFYdaYzdrg5p4K+mExHqeg@mail.gmail.com>
On Sat, Feb 29, 2020 at 4:31 PM Elijah Newren <newren@gmail.com> wrote:
Show 9 quoted lines
>
> Ick; we don't need the warning to regurgitate large sections of the
> manual, we only need to provide pointers and then they can look up the
> details in their favorite way (google, stackoverflow, looking at the
> actual manpage, etc.)  How about something more like
>
> > +               warning(_("Pulling without specifying how to reconcile divergent branches\n"
> > +                       "is discouraged. You can squelch this message by setting pull.rebase,\n"
> > +                       "or by passing any of --rebase, --no-rebase, or --ff-only\n"));

I intentionally made the message similar to the message you get when you try to commit without setting user.name or user.email. Providing the user with clear information on the spot is much more effective at getting them to do the right thing than expecting them to use Google or reread the man pages. We also want the user to understand that they only have to set pull.rebase or pull.ff once, whereas a command-line flag applies only to the current pull. Nevertheless, any warning message is better than no warning at all, so I would be happy to resubmit with your proposed text if there's consensus that a shorter message is better.

-Alex
Previous: Elijah NewrenNext: Junio C Hamano
Message 3 of 5 in “pull: warn if the user didn't say whether to rebase or to merge”
  1. pull: warn if the user didn't say whether to rebase or to mergeAlex Henrie, Feb 29, 2020
  2. Elijah NewrenFeb 29, 2020
  3. Alex HenrieMar 1, 2020
  4. Junio C HamanoMar 2, 2020
  5. Junio C HamanoMar 2, 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.