Re: [PATCH 7/9] get_short_oid / peel_onion: ^{tree} should mean tree, not treeish

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

 



On Mon, Apr 30, 2018 at 10:07:32PM +0000, Ævar Arnfjörð Bjarmason wrote:
> diff --git a/sha1-name.c b/sha1-name.c
> index 023f9471a8..b61c0558d9 100644
> --- a/sha1-name.c
> +++ b/sha1-name.c
> @@ -970,7 +970,7 @@ static int peel_onion(const char *name, int len, struct object_id *oid,
>  	else if (expected_type == OBJ_TAG)
>  		lookup_flags |= GET_OID_TAG;
>  	else if (expected_type == OBJ_TREE)
> -		lookup_flags |= GET_OID_TREEISH;
> +		lookup_flags |= GET_OID_TREE;
>  	else if (expected_type == OBJ_BLOB)
>  		lookup_flags |= GET_OID_BLOB;
>  

I was concerned at first that this might lead to some sort of wrong
behavior when we do something like "git rev-parse v2.17.0^{tree}", but
looking at the code I've mostly convinced myself that that should still
work.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[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