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

Re: [GSoC][RFC PATCH 0/2] Add refs list subcommand

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 14, 2025, 23:45 UTC
Message-ID
<xmqqsek16g6c.fsf@gitster.g>
In-Reply-To
<20250614070536.17320-1-meetsoni3017@gmail.com>
Meet Soni <meetsoni3017@gmail.com> writes:
Show 11 quoted lines
> This RFC is meant to start a broader discussion on:
>
>   - The desired default behavior of pattern matching in git refs list
>
>   - Which features from both git-show-ref and git-for-each-ref should be
>     preserved, rethought, or dropped
>
>   - How much backward compatibility we want to offer, and through what
>     interface (e.g., compatibility flags)
>
> Feedback and thoughts on these topics would be very welcome.

In addition to these three points, 0th point perhaps is "Is it desirable to unify these two commands in the first place?"

I only use "show-ref" when I care about a single ref in a script, expecting to be able to switch on its exit status. Everything else I'd use for-each-ref.

But then that particular unique advantage of show-ref over for-each-ref can be done with "rev-parse --verify".

So, I'd rather not to see yet another command to do the same thing. Rather, is it insufficient to just use for-each-ref or rev-parse, let the sleeping show-ref alone, and be happy?

Show 10 quoted lines
> Meet Soni (2):
>   builtin/refs: add list subcommand
>   t: add tests for refs list subcommand
>
>  Documentation/git-refs.adoc |  25 ++++++++
>  builtin/refs.c              | 110 ++++++++++++++++++++++++++++++++++++
>  t/meson.build               |   1 +
>  t/t1461-refs-list.sh        |  95 +++++++++++++++++++++++++++++++
>  4 files changed, 231 insertions(+)
>  create mode 100755 t/t1461-refs-list.sh
Previous: Meet SoniNext: Meet Soni
Message 4 of 5 in “Add refs list subcommand”
  1. Meet SoniJun 14, 2025
  2. [GSoC][RFC PATCH 1/2] builtin/refs: add list subcommandMeet Soni, Jun 14, 2025
  3. [GSoC][RFC PATCH 2/2] t: add tests for refs list subcommandMeet Soni, Jun 14, 2025
  4. Junio C HamanoJun 14, 2025
  5. Meet SoniJun 17, 2025

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.