|
@@ -10,10 +10,11 @@ from dulwich.patch import write_tree_diff
|
|
|
import sys
|
|
|
|
|
|
repo_path = "."
|
|
|
-commit_id = "a6602654997420bcfd0bee2a0563d9416afe34b4"
|
|
|
+commit_id = b"a6602654997420bcfd0bee2a0563d9416afe34b4"
|
|
|
|
|
|
r = Repo(repo_path)
|
|
|
|
|
|
commit = r[commit_id]
|
|
|
parent_commit = r[commit.parents[0]]
|
|
|
-write_tree_diff(sys.stdout, r.object_store, parent_commit.tree, commit.tree)
|
|
|
+outstream = getattr(sys.stdout, 'buffer', sys.stdout)
|
|
|
+write_tree_diff(outstream, r.object_store, parent_commit.tree, commit.tree)
|