diff-tree: clean up diff_tree_stdin() function