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

Re: git-pull --tags with no merge candidates case gives confusing error message

From
Paul Tan <pyokagan@gmail.com>
Date
May 13, 2015, 10:13 UTC
Message-ID
<CACRoPnSjaE677xa9i2m-f28TYbfg7XbmWOP9r_-5ELhXOWY2fQ@mail.gmail.com>
In-Reply-To
<555259E5.4040304@alum.mit.edu>
Hi,
On Wed, May 13, 2015 at 3:52 AM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 6 quoted lines
> I never use pull so I'm not really acquainted with its semantics. But it
> seems to me that when you remove the special "--tags" error message, you
> might also have to adjust the logic later in the function that looks at
> "$#". Specifically, unless the presence of a "--tags" option can provide
> candidates for merging, then in "[ $# -gt 1 ]", "$#" might need to be
> changed to "the number of arguments *not including --tags arguments*".

Yes, I'm aware of the problems of using "$@" and "$#" including git-fetch's options in git-pull[1]. It's not just enough to skip over arguments that look like options, though, as we do not know if the options take values or not, so the whole logic may become complicated. I'm planning to solve it in a later patch series by explicitly parsing git-fetch's options as well.

[1] http://thread.gmane.org/gmane.comp.version-control.git/268510/focus=268565

Thanks, Paul

Previous: Michael Haggerty
Message 5 of 5 in “git-pull --tags with no merge candidates case gives confusing error message”
  1. Paul TanMay 12, 2015
  2. Junio C HamanoMay 12, 2015
  3. pull: remove --tags error in no merge candidates casePaul Tan, May 13, 2015
  4. Michael HaggertyMay 12, 2015
  5. Paul TanMay 13, 2015

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.