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

[PATCH] describe: fix --long output

From
SBSanti Béjar <sbejar@gmail.com>
Date
Mar 3, 2008, 14:37 UTC
Message-ID
<1204555066-8820-1-git-send-email-sbejar@gmail.com>
Without this the output is:

$ git describe --long origin/next v1.5.4.3-0-g31e0b2c-500-g83a2cbb

It was introduced in the conflicting part of b00ac8c (Merge branch 'sp/describe-tag')

Signed-off-by: Santi Béjar <sbejar@gmail.com>
---
 builtin-describe.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin-describe.c b/builtin-describe.c
index 2f1e7ba..7ba822a 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -166,9 +166,6 @@ static void display_name(struct commit_name *n)
 		printf("%s", n->tag->tag);
 	else
 		printf("%s", n->path);
-	if (longformat)
-		printf("-0-g%s",
-		       find_unique_abbrev(n->tag->tagged->sha1, abbrev));
 }
 
 static void describe(const char *arg, int last_one)
@@ -196,6 +193,9 @@ static void describe(const char *arg, int last_one)
 	n = cmit->util;
 	if (n) {
 		display_name(n);
+		if (longformat)
+			printf("-0-g%s",
+				find_unique_abbrev(n->tag->tagged->sha1, abbrev));
 		printf("\n");
 		return;
 	}
-- 
1.5.4.3.488.g7b3a6
Message 1 of 1 in “describe: fix --long output”
  1. describe: fix --long outputSanti Béjar, Mar 3, 2008

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.