git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eugene Sajine <euguess@gmail.com>, <git@vger.kernel.org>
Subject: Re: [PATCH] describe: when failing, tell the user about options that work
Date: Fri, 23 Oct 2009 10:34:07 +0200	[thread overview]
Message-ID: <200910231034.09747.trast@student.ethz.ch> (raw)
In-Reply-To: <7vljj3dkid.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Thomas Rast <trast@student.ethz.ch> writes:
> 
> > @@ -259,7 +260,14 @@ static void describe(const char *arg, int last_one)
> >  			printf("%s\n", find_unique_abbrev(sha1, abbrev));
> >  			return;
> >  		}
> > -		die("cannot describe '%s'", sha1_to_hex(sha1));
> > +		if (unannotated_cnt)
> > +			die("cannot describe '%s'"
> > +			    " with only\nannotated tags. Try --tags.",
> 
> Did you mean UNannotated tags here?

No, but I think I see where the misunderstanding came from.

This code path means that we did not find a tag to describe with, but
we counted some unannotated tags (and because of how the counting
logic is wrapped, this only triggers when neither --all nor --tags are
in effect).

So I wanted it to say "it is impossible to describe this with the tags
you told me to use", which in this case are the annotated ones.

I tried to keep the general structure of the message ("cannot describe
..."), and with this restriction I can't seem to find a clearer
wording.  However, it could be written e.g.

  No annotated tags can describe '%s'.  However, there were
  unannotated tags: try --tags.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2009-10-23  8:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 14:47 git describe is failing Eugene Sajine
2009-10-22 14:59 ` Mikael Magnusson
2009-10-22 15:02 ` Thomas Rast
2009-10-22 15:10   ` Eugene Sajine
2009-10-22 15:44     ` [PATCH] describe: when failing, tell the user about options that work Thomas Rast
2009-10-22 16:40       ` Alex Riesen
2009-10-22 22:26         ` Junio C Hamano
2009-10-23  0:13           ` Nicolas Pitre
2009-10-23  0:28             ` Junio C Hamano
2009-10-23  0:25       ` Junio C Hamano
2009-10-23  8:34         ` Thomas Rast [this message]
2009-10-23 18:57           ` Junio C Hamano
2009-10-28 22:10             ` [PATCH v2] " Thomas Rast

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=200910231034.09747.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=euguess@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).