On 03/10/2014 08:46 AM, Michael Haggerty wrote: > This test is trying to test a few ways to delete references using "git > update-ref -z --stdin". The third line passed in is > > update SP /refs/heads/c NUL NUL <sha1> NUL > > , which is not a correct way to delete a reference according to the > documentation (the new value should be zeros, not empty). Pass zeros > instead as the new value to test the code correctly.
In my original work on this feature, an empty <newvalue> is allowed. Since newvalue is not optional an empty value can be treated as zero. The relevant documentation is: update:: Set <ref> to <newvalue> after verifying <oldvalue>, if given. Specify a zero <newvalue> to ensure the ref does not exist ... Use 40 "0" or the empty string to specify a zero value, except that with `-z` an empty <oldvalue> is considered missing. The two together say that <newvalue> can be the empty string instead of a literal zero. -Brad -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html