Re: [PATCH] describe: when failing, tell the user about options that work
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Oct 22, 2009, 16:40 UTC
- Message-ID
- <81b0412b0910220940n78ddb774i30338147327b198a@mail.gmail.com>
- In-Reply-To
- <f1e86b9095d63c6541d0a8df6a1cf8eadfe247bb.1256226187.git.trast@student.ethz.ch>
On Thu, Oct 22, 2009 at 17:44, Thomas Rast <trast@student.ethz.ch> wrote:
Show 13 quoted lines
> @@ -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.",
> + sha1_to_hex(sha1));
> + else
> + die("cannot describe '%s'"
> + " with tags\nTry --always, or create some tags.",
> + sha1_to_hex(sha1));These are quite verbose. Could they be conditional on something like advice.describeHints?