public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Paul Tan <pyokagan@gmail•com>
Cc: Michael Haggerty <mhagger@alum•mit.edu>, Git List <git@vger•kernel.org>
Subject: Re: git-pull --tags with no merge candidates case gives confusing error message
Date: Tue, 12 May 2015 10:23:19 -0700	[thread overview]
Message-ID: <xmqq38311zi0.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CACRoPnQvNvBv1_wBzWQH6A8XRvWZ+HURvtkqtgYpwjjNXuCERg@mail.gmail.com> (Paul Tan's message of "Tue, 12 May 2015 13:59:04 +0800")

Paul Tan <pyokagan@gmail•com> writes:

> This behavior was introduced in 441ed41 ("git pull --tags": error out
> with a better message., 2007-12-28), which stated that:
>
>     In the longer term, it would be a better approach to change the
>     semantics of --tags option to make "git fetch" and "git pull"
>     to:
>     ...
>     Then we would not need to have this separate error message, as
>     the ordinary merge will happen even with the --tags option.
>
> Given that as of c5a84e9 (fetch --tags: fetch tags *in addition to*
> other stuff, 2013-10-30), git-pull --tags will fetch tags in addition
> to the configured refspecs, so if there are no merge candidates, it
> would not be because --tags was specified on the command line.
>
> As such, I wonder if the error message should be removed, since it
> conceals the actual reason of why there are no merge candidates.

I love it when people carefully analyse why the things are in the
way they are, and some things no longer make sense in today's world
order.

I agree 100% with your analysis.  c5a84e9 should have tweaked this
part, but was not careful enough, and made the heuristic used in
441ed41 when diagnosing the error is a bad one now.  It should go.

  reply	other threads:[~2015-05-12 17:23 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 [this message]
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

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=xmqq38311zi0.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=mhagger@alum$(echo .)mit.edu \
    --cc=pyokagan@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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