Re: [PATCH/RFC 01/12] commit-tree: allow indirect tree references
- From
Mark Lodato <lodatom@gmail.com>
- Date
- Mar 16, 2010, 00:44 UTC
- Message-ID
- <ca433831003151744j80c5421n9cd1f310687dace3@mail.gmail.com>
- In-Reply-To
- <7v634z7uke.fsf@alter.siamese.dyndns.org>
On Sat, Mar 13, 2010 at 5:58 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Mark Lodato <lodatom@gmail.com> writes: > >> 'git commit-tree' was the last remaining built-in to accept a <tree> but >> not a <tree-ish> (an indirect tree reference through a commit or tag >> object.) > > Historically we deliberately chose not to DWIM things down to tree for > this plumbing command to catch mistakes by Porcelain scripts > (e.g. arguments given in wrong order---the order of commit-tree's > arguments are, eh, unintuitive). > > I do not think that matters much anymore---I do not think this patch > is unsafe.
I thought about that, but upon investigation, the _only_ command that doesn't DWIM with respect to object types (<tree> or <commit>) is commit-tree. So, I thought it might make sense to treat this like all the other commands. On the other hand, it may be a good idea to keep this special for safety. If so, then I would just amend the documentation to note that it does not automatically dereference commit or tag objects.