Code

describe: when failing, tell the user about options that work
authorThomas Rast <trast@student.ethz.ch>
Wed, 28 Oct 2009 22:10:06 +0000 (23:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Oct 2009 23:45:24 +0000 (16:45 -0700)
commit4d23660e79dbbb7e2ae37cb7193166d085a78502
tree36adf863ee02414255a4a5b1570202ff176f721e
parentcd0f8e6d63d3e2744d7d3b2329238be7d064a8ea
describe: when failing, tell the user about options that work

Users seem to call git-describe without reading the manpage, and then
wonder why it doesn't work with unannotated tags by default.

Make a minimal effort towards seeing if there would have been
unannotated tags, and tell the user.  Specifically, we say that --tags
could work if we found any unannotated tags.  If not, we say that
--always would have given results.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-describe.c