Re: [PATCH] show-ref: add --unresolved option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Cai <johncai86@xxxxxxxxx> 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.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux