Subject: Re: mktree: multiple same-named objects

From: Junio C Hamano <[email-masked]>
Date: Wed, 27 Aug 2014 08:17:15 -0700

Jeff King <[email-masked]> writes:

> On Wed, Aug 27, 2014 at 12:41:57AM -0400, David Turner wrote:
>
>> git mktree seems to allow the creation of a tree object with multiple
>> objects of the same name but different SHAs.
>
> Yeah, I don't think we do many quality checks there. Ditto for "git
> hash-object".

I am somewhat against outright removing the capability to write out
invalid objects deliberately from these low level tools, because we
would need a way to easily reproduce bugs in end-user facing tools
by other people who claim to produce Git objects, but I would agree
that by default that should be forbidden.

In other words, two things must happen; improve checks when these
low level debugging aid tools are creating objects, and allow
bypassing these additional checks with "--experiment" option or
something.