From: Junio C Hamano <gitster@pobox.com>
To: John Cai <johncai86@gmail.com>
Cc: John Cai via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] show-ref: add --unresolved option
Date: Tue, 05 Mar 2024 13:29:41 -0800 [thread overview]
Message-ID: <xmqqzfvcz7sq.fsf@gitster.g> (raw)
In-Reply-To: <44609CA3-1215-4EAD-8456-DDD66A3B93A8@gmail.com> (John Cai's message of "Tue, 05 Mar 2024 15:56:03 -0500")
John Cai <johncai86@gmail.com> writes:
> I think something like --no-dereference that was suggested in [1] could work
> since the concept of dereferencing should be familiar to the user. However, this
> maybe confusing because of the existing --dereference flag that is specific to
> tags...
True.
As a symbolic reference is like a symbolic link [*], another possibility
is to use "follow", which often is used to refer to the action of
reading the contents of a symbolic link and using it as the target
pathname (e.g., O_NOFOLLOW flag forbids open(2) from following
symbolic links). Unfortunately the checkbox feature "--follow" the
"git log" has refers to an entirely different kind of following, so
it is just as confusing as --dereference.
Perhaps "--readlink", if you are showing only "ref: refs/heads/main"
instead of the usual object name in the output? If we are showing
both, we may want to use a name that signals the optional nature of
the symref part of the output, e.g., "--with-symref-target" [*].
[Footnote]
* In fact that is how the symbolic reference started out as. We
literally used a symbolic link .git/HEAD that points at the
current branch, which can be seen in v0.99~418 (git-init-db: set
up the full default environment, 2005-05-30).
* Yes, I know, I am terrible at naming things---my names may be
descriptive but end up being unusably long and verbose.
next prev parent reply other threads:[~2024-03-05 21:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 22:51 [PATCH] show-ref: add --unresolved option John Cai via GitGitGadget
2024-03-04 23:23 ` Junio C Hamano
2024-03-05 20:56 ` John Cai
2024-03-05 21:29 ` Junio C Hamano [this message]
2024-03-05 15:30 ` Phillip Wood
2024-03-05 17:01 ` Kristoffer Haugsbakk
2024-03-06 0:33 ` Jeff King
2024-03-06 2:19 ` Junio C Hamano
2024-03-06 0:41 ` Jeff King
2024-03-06 7:31 ` Patrick Steinhardt
2024-03-06 7:51 ` Jeff King
2024-03-06 16:48 ` Junio C Hamano
2024-03-06 9:36 ` Jean-Noël Avila
2024-04-08 17:38 ` [PATCH v2 0/3] show-ref: add --symbolic-name option John Cai via GitGitGadget
2024-04-08 17:38 ` [PATCH v2 1/3] refs: keep track of unresolved reference value in iterator John Cai via GitGitGadget
2024-04-08 23:02 ` Junio C Hamano
2024-04-09 20:29 ` John Cai
2024-04-10 6:52 ` Patrick Steinhardt
2024-04-10 15:26 ` Junio C Hamano
2024-04-11 9:11 ` Patrick Steinhardt
2024-04-08 17:38 ` [PATCH v2 2/3] refs: add referent to each_repo_ref_fn John Cai via GitGitGadget
2024-04-08 17:38 ` [PATCH v2 3/3] show-ref: add --symbolic-name option John Cai via GitGitGadget
2024-04-09 15:25 ` Phillip Wood
2024-04-11 19:57 ` John Cai
2024-04-12 9:37 ` phillip.wood123
2024-04-10 6:53 ` Patrick Steinhardt
2024-04-10 15:27 ` Junio C Hamano
2024-04-12 15:23 ` John Cai
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqzfvcz7sq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johncai86@gmail.com \
--cc=ps@pks.im \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).