Re: [PATCH 7/9] get_short_oid / peel_onion: ^{tree} should mean tree, not treeish
From: brian m. carlson <hidden>
Date: 2018-05-01 01:14:02
Attachments
- signature.asc [application/pgp-signature] 867 bytes
From: brian m. carlson <hidden>
Date: 2018-05-01 01:14:02
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