From: Junio C Hamano Date: Thu, 04 Mar 2010 06:43:57 GMT Subject: Re: What should "git submodule summary" give before an initial commit? Message-ID: <7vvddcd1si.fsf@alter.siamese.dyndns.org> In-Reply-To: Sverre Rabbelier writes: > Yes, that's what I came up with after sending my email, commands that > _default_ to HEAD as revision should instead default to an empty > commit when there is no HEAD yet. Perhaps something we can add to > parse_opt and then make sure that all commands we care about use that > feature? I doubt it would be very much useful as a general feature, as sometimes we default to HEAD because we want a tree-ish (in which case using "empty tree" would be appropriate) and other times because we want an actual commit (e.g. "git commit --amend" should exit, not "amend an empty tree") and we would need to be careful to study each codepath and use the appropriate one. But you are welcome to try and prove me wrong with a working patch ;-).