Re: [FIXED PATCH] git-describe: Add a --match option to limit considered tags.
- From
Pierre Habouzit <madcoder@debian.org>
- Date
- Dec 22, 2007, 18:02 UTC
- Message-ID
- <20071222180244.GD23262@artemis.madism.org>
- In-Reply-To
- <20071221214954.GA16481@artemis.madism.org>
Like I said on IRC, I saw that git describe --contains has a bad behaviour:
$ git describe --match='asd*' HEAD; echo $?
fatal: cannot describe 'e272415ab7da3bde51af2ce95c88d7be3abfba28'
128
$ git describe --contains HEAD; echo $?
undefined
0THe "undefined" output is on stdout (not stderr), and returns 0. The issue here is that it internally uses git-name-rev by exec-ing it, which makes it hard to fix. Though I suppose that we could instead of fork-ing share some logic with builtin-name-rev.c, but I'm not at home yet, so won't likely have a patch for this issue.
Note that the use of the "new" --match here was just to be unable to describe the HEAD to show the difference, the inconsistency has nothing to do with the patch I propose, I just happen to noticed that.
AFAICT it's not a regression, it's just a misfeature :)
-- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org