From: Ben Knoble <ben.knoble@gmail.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Junio C Hamano <gitster@pobox.com>,
Meet Soni <meetsoni3017@gmail.com>,
git@vger.kernel.org, shejialuo@gmail.com
Subject: Re: [GSoC][PATCH] builtin/refs: add 'get' subcommand
Date: Wed, 24 Sep 2025 11:29:11 -0400 [thread overview]
Message-ID: <4FEB2B85-FC32-4076-9DA6-F47AAB096CB0@gmail.com> (raw)
In-Reply-To: <aNOQhncjwYCwCaZ3@pks.im>
> Le 24 sept. 2025 à 02:37, Patrick Steinhardt <ps@pks.im> a écrit :
>
> On Tue, Sep 23, 2025 at 02:50:46PM -0700, Junio C Hamano wrote:
>> Meet Soni <meetsoni3017@gmail.com> writes:
>>
>>> While `git-rev-parse(1)` and `git-show-ref(1)` can be used to read
>>> reference values, they have drawbacks for scripting and discoverability.
>>> `rev-parse` performs DWIM expansion which is unpredictable for scripts,
>>> and `show-ref --verify` is difficult to discover and cannot read the
>>> direct target of a symbolic reference.
>>
>> Well "refs get" is even harder to discover (it is not even in Git
>> 2.50's manual that is available everywhere on the net), so difficult
>> to discover is not a good excuse. In a sense show-ref was invented
>> exactly to serve as something like "refs get" you are writing, so I
>> wonder if a better approach is to extend it instead of introducing
>> a new subcommand in a distant place from it?
>>
>> Perhaps "show-ref --verify --no-deref" or something that does not
>> dereference but works directly on a symbolic ref?
>
> For now: yes, it's more difficult to discover for sure. But users will
> adjust over time as they get more familiar with git-refs(1), and from
> thereon I think it will become significantly easier to discover that
> subcommand.
I think this goes to perhaps some of my unasked questions: who is the target audience? My experience suggest that most mostly-porcelain users don’t acquire familiarity with scripting commands, so it sounds like we’re talking about script-writers here (and in the commit message).
But how do we encourage script writers to discover these things? 🤔 Hm.
next prev parent reply other threads:[~2025-09-24 15:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 10:45 [GSoC][PATCH] builtin/refs: add 'get' subcommand Meet Soni
2025-09-23 16:57 ` Ben Knoble
2025-09-24 6:32 ` Patrick Steinhardt
2025-09-23 21:50 ` Junio C Hamano
2025-09-24 6:32 ` Patrick Steinhardt
2025-09-24 15:29 ` Ben Knoble [this message]
2025-09-24 17:11 ` Junio C Hamano
2025-09-25 6:25 ` Patrick Steinhardt
2025-09-25 18:08 ` D. Ben Knoble
2025-09-25 18:43 ` Junio C Hamano
2025-09-24 6:32 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FEB2B85-FC32-4076-9DA6-F47AAB096CB0@gmail.com \
--to=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=meetsoni3017@gmail.com \
--cc=ps@pks.im \
--cc=shejialuo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).