Re: [ANNOUNCE] Git v1.8.3-rc0

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

 



On 04/27/2013 04:24 AM, shawn wilson wrote:
> On Fri, Apr 26, 2013 at 8:22 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> 
>>  * There was no good way to ask "I have a random string that came from
>>    outside world. I want to turn it into a 40-hex object name while
>>    making sure such an object exists".  A new peeling suffix ^{object}
>>    can be used for that purpose, together with "rev-parse --verify".
>>
> 
> What does this mean / what is the reason behind this? I can only think
> it might be useful in a test suite to make sure git isn't doing
> anything stupid with hashes...?

The topic is discussed here:

http://git.661346.n2.nabble.com/Bug-in-quot-git-rev-parse-verify-quot-td7580929.html

As discussed in the thread, when verifying that an argument names an
existing object, it is usually also appropriate to verify that the named
object is of a particular type (or can be converted to a particular
type), which could already be done with syntax like
"$userstring^{commit}".  But if, for example, you want to avoid
unwrapping tags but also want to verify that the named object really
exists, "$userstring^{object}" now provides a way.

And what do you have against test suites? :-)

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx
http://softwareswirl.blogspot.com/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]