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

Re: [PATCH] git-for-each-ref: add new field name "symbolic"

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 13, 2010, 07:45 UTC
Message-ID
<7v4ollshn5.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1266040518-11748-1-git-send-email-larry@elder-gods.org>
Larry D'Anna <larry@elder-gods.org> writes:
> %(symbolic) will expand to "true" for symbolic refs, and "false" otherwise.
> This is a lot faster than calling git-symbolic-ref on every single ref from your
> shell script.

I think this is a good idea, but I suspect that much more than half of people who iterate over for-each-ref output and run symbolic-ref would actually want to learn what actual ref a symbolic one points at. So you may not be helping as much people as you could by going in this direction.

Instead of expanding to "true", why not make it show the expansion if it is symbolic, and to empty if it is not?

Previous: Larry D'AnnaNext: Jeff King
Message 2 of 3 in “git-for-each-ref: add new field name "symbolic"”
  1. git-for-each-ref: add new field name "symbolic"Larry D'Anna, Feb 13, 2010
  2. Junio C HamanoFeb 13, 2010
  3. Jeff KingFeb 13, 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.