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

Re: [PATCH RFC] for-each-ref: Field with abbreviated objectname

From
Jeff King <peff@peff.net>
Date
May 4, 2010, 11:01 UTC
Message-ID
<20100504110134.GA7947@coredump.intra.peff.net>
In-Reply-To
<61d114759b023b3937f8417ce44c3361f345c6f1.1272918259.git.git@drmicha.warpmail.net>
On Mon, May 03, 2010 at 10:25:19PM +0200, Michael J Gruber wrote:
> Introduce a :short modifier to objectname which outputs the abbreviated
> object name.
I don't see any reason not to do this if you have a use for it.
>     TODO: test, doc
Yep.
> +		else if (!strcmp(name, "objectname:short")) {
> +			v->s = find_unique_abbrev(obj->sha1, DEFAULT_ABBREV);
> +		}

In theory there could be multiple such ":$foo" tags, and we would have to fix this parser. But given that there aren't other modifiers now, I think we can just push that problem off until it happens (if ever).

-Peff
Previous: Michael J GruberNext: Michael J Gruber
Message 2 of 4 in “for-each-ref: Field with abbreviated objectname”
  1. for-each-ref: Field with abbreviated objectnameMichael J Gruber, May 3, 2010
  2. Jeff KingMay 4, 2010
  3. for-each-ref: Field with abbreviated objectnameMichael J Gruber, May 13, 2010
  4. Jeff KingMay 14, 2010

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.