Jon Seymour [off-list ref] writes:
Does git-mktree normalize the sort order of the input or take it as it
is? I can see a case for having it do normalization, if it doesn't
already and probably for this to be the default behaviour.
It does have "accumulate and qsort before writing it out", since 83f5053
(git-mktree: reverse of git-ls-tree., 2006-02-20).
This program was done as a quick hack but it is so old that I forgot all
about it. If you are going to use it, you may have to do some reality
checks on it first. For example, notice that the date above predates the
introduction of gitlinks, so I would not be too surprised if it barfed
when given a commit object in its input.