浏览代码

Stash commit time when reconstituting a commit

John Carr 16 年之前
父节点
当前提交
466417fec2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      dulwich/objects.py

+ 2 - 2
dulwich/objects.py

@@ -362,8 +362,8 @@ class Commit(ShaFile):
     self._text += "%s %s\n" % (TREE_ID, self._tree)
     for p in self._parents:
       self._text += "%s %s\n" % (PARENT_ID, p)
-    self._text += "%s %s\n" % (AUTHOR_ID, self._author)
-    self._text += "%s %s\n" % (COMMITTER_ID, self._committer)
+    self._text += "%s %s %s +0000\n" % (AUTHOR_ID, self._author, str(self._commit_time))
+    self._text += "%s %s %s +0000\n" % (COMMITTER_ID, self._committer, str(self._commit_time))
     self._text += message
 
   @property