Re: [PATCH/RFC] get_sha1: prefer 40-hex ref name over 40-hex SHA-1

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

 



Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes:

> +test_expect_success 'rev-parse 20-hex ref' '
> +	REF=`git rev-parse HEAD` &&
> +	VAL=`echo| git commit-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904` &&
> +	git update-ref refs/heads/$REF $VAL &&
> +	test `git rev-parse $REF` = $VAL
> +'
> +
> +test_expect_success 'rev-parse ambiguous 20-hex ref' '
> +	REF=`git rev-parse HEAD` &&
> +	VAL=`echo| git commit-tree -p HEAD 4b825dc642cb6eb9a060e54bf8d69288fbee4904` &&
> +	git update-ref refs/tags/$REF $VAL &&
> +	test `git rev-parse $REF 2>err` = $VAL &&
> +	grep "refname.*ambiguous" err
> +'

Shouldn't these say s/20-hex/40-hex/?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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]