From: Thomas Rast Date: Fri, 23 Oct 2009 08:34:07 GMT Subject: Re: [PATCH] describe: when failing, tell the user about options that work Message-ID: <200910231034.09747.trast@student.ethz.ch> In-Reply-To: <7vljj3dkid.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > Thomas Rast 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