tree-diff: allow diff_tree_sha1 to accept NULL sha1