git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
    0

THe "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
Previous: Pierre HabouzitNext: Pierre Habouzit
Message 5 of 7 in “git-describe: Add a --match option to limit considered tags.”
  1. git-describe: Add a --match option to limit considered tags.Pierre Habouzit, Dec 21, 2007
  2. Junio C HamanoDec 21, 2007
  3. Pierre HabouzitDec 21, 2007
  4. git-describe: Add a --match option to limit considered tags.Pierre Habouzit, Dec 21, 2007
  5. Pierre HabouzitDec 22, 2007
  6. Pierre HabouzitDec 24, 2007
  7. Pierre HabouzitDec 24, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.