On Wed, Mar 31, 2021 at 11:41:18AM -0700, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > + if (flags & OBJECT_AS_TYPE_EXPECT_PARSED) > > + error(_("object %s is a %s, but was referred to as a %s"), > > + oid_to_hex(&obj->oid), type_name(obj->type), > > + type_name(type)); > > + else > > + error(_("object %s referred to as both a %s and a %s"), > > + oid_to_hex(&obj->oid), > > + type_name(obj->type), type_name(type)); > > + } > > Am I correct to understand that the latter is after we read a tree > that refers to an object with 100644 (blob) and then another tree > that refers to the same object with 40000 (tree), before we have a > need/chance to actually find out what that object is? The error > would trigger while reading the second tree and find the second > mention of the object that conflicts with the earlier one? Yes, exactly (or two tags, or a tag and a tree, or a commit and a tree, etc). -Peff