Re: [PATCH 6/8] check_refname_format(): add FULLY_QUALIFIED flag

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

>> valid. E.g., validating a refspec may involve a name like "main" on its
>> own. I suspect it would be OK in practice to just give it an arbitrary
>> "refs/foo/$main", but that feels kind of hacky.
>
> Ah, fair enough.

I actually do not think it is fair enough.  Why does the caller want
to validate "main" in the first place?  To make the example more
realistic, lets imagine a caller wants to validate "HEAD".  We can
say "it is syntactically correct", but in what context is that
answer useful?  If the caller is contemplating to create a new
branch given a short-name, we would want to say "no, refs/heads/HEAD
is not something we want you to create", but if the caller is
planning to create refs/remotes/origin/HEAD, our answer would be
different.






[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