From: Paul Tan <pyokagan@gmail.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: Junio C Hamano <gitster@pobox.com>, Git List <git@vger.kernel.org>
Subject: Re: git-pull --tags with no merge candidates case gives confusing error message
Date: Wed, 13 May 2015 18:13:51 +0800 [thread overview]
Message-ID: <CACRoPnSjaE677xa9i2m-f28TYbfg7XbmWOP9r_-5ELhXOWY2fQ@mail.gmail.com> (raw)
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:
> 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
prev parent reply other threads:[~2015-05-13 10:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 5:59 git-pull --tags with no merge candidates case gives confusing error message Paul Tan
2015-05-12 17:23 ` Junio C Hamano
2015-05-13 10:06 ` [PATCH] pull: remove --tags error in no merge candidates case Paul Tan
2015-05-12 19:52 ` git-pull --tags with no merge candidates case gives confusing error message Michael Haggerty
2015-05-13 10:13 ` Paul Tan [this message]
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=CACRoPnSjaE677xa9i2m-f28TYbfg7XbmWOP9r_-5ELhXOWY2fQ@mail.gmail.com \
--to=pyokagan@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/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).