The "git diff-tree HEAD" command (with the default raw output) starts by printing a hash, which seems to be the hash for the commit (HEAD in this case).
I can't find any description of this in the documentation for diff-tree.
The "output format" sectionis the generic diff-format.txt that describes the format of the lines for the files that differ. Nothing wrong with that, but it doesn't explain the initial line of diff-tree.
The documentation of the --stdin flag mentions some initial output, but that is not relevant in this case.
-- David Kågedal