Sverre Rabbelier [off-list ref] 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 ;-).