Only show committer if it is different from author.
authorJelmer Vernooij <jelmer@jelmer.uk>
Wed, 9 Nov 2016 15:43:51 +0000 (15:43 +0000)
committerJelmer Vernooij <jelmer@jelmer.uk>
Wed, 9 Nov 2016 15:43:51 +0000 (15:43 +0000)
dulwich/porcelain.py

index 04824e5d69e0d79046b4e4b52b0c16ec62abcf52..58c7ccb6ac1901ac3665c381fc81c7dbb5db209e 100644 (file)
@@ -338,8 +338,9 @@ def print_commit(commit, decode, outstream=sys.stdout):
     if len(commit.parents) > 1:
         outstream.write("merge: " +
             "...".join([c.decode('ascii') for c in commit.parents[1:]]) + "\n")
-    outstream.write("author: " + decode(commit.author) + "\n")
-    outstream.write("committer: " + decode(commit.committer) + "\n")
+    outstream.write("Author: " + decode(commit.author) + "\n")
+    if commit.author != commit.committer:
+        outstream.write("Committer: " + decode(commit.committer) + "\n")
     outstream.write("\n")
     outstream.write(decode(commit.message) + "\n")
     outstream.write("\n")