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

Re: [PATCH] Teach git-describe --long to output always the long format

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 25, 2008, 02:36 UTC
Message-ID
<20080225023634.GK8410@spearce.org>
In-Reply-To
<1203864412-27977-1-git-send-email-sbejar@gmail.com>
Santi Bjar <sbejar@gmail.com> wrote:
Show 7 quoted lines
> @@ -155,7 +156,11 @@ static void describe(const char *arg, int last_one)
>  
>  	n = cmit->util;
>  	if (n) {
> -		printf("%s\n", n->path);
> +		if (!longformat)
> +			printf("%s\n", n->path );
Extra whitespace after the "path".
> +		else
> +			printf("%s-0-g%s\n", n->path,
> +				find_unique_abbrev(cmit->object.sha1, abbrev));

Is this really that useful? Where is having the tag and the commit SHA-1 both useful?

Show 8 quoted lines
>  		return;
>  	}
>  
> @@ -254,6 +259,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
>  		OPT_BOOLEAN(0, "debug",      &debug, "debug search strategy on stderr"),
>  		OPT_BOOLEAN(0, "all",        &all, "use any ref in .git/refs"),
>  		OPT_BOOLEAN(0, "tags",       &tags, "use any tag in .git/refs/tags"),
> +		OPT_BOOLEAN(0, "long",       &longformat, "always use long format"),
Documentation?
-- 
Shawn.
Previous: Santi BéjarNext: Junio C Hamano
Message 2 of 12 in “Teach git-describe --long to output always the long format”
  1. Teach git-describe --long to output always the long formatSanti Béjar, Feb 24, 2008
  2. Shawn O. PearceFeb 25, 2008
  3. Junio C HamanoFeb 25, 2008
  4. Santi BéjarFeb 25, 2008
  5. Junio C HamanoFeb 25, 2008
  6. Santi BéjarFeb 25, 2008
  7. Junio C HamanoFeb 25, 2008
  8. Santi BéjarFeb 25, 2008
  9. Junio C HamanoFeb 26, 2008
  10. Santi BéjarFeb 26, 2008
  11. Jakub NarebskiFeb 25, 2008
  12. Teach git-describe --long to output always the long formatSanti Béjar, Feb 25, 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.