We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent9d0473c commit5d602f2Copy full SHA for 5d602f2
git/objects/commit.py
@@ -254,7 +254,7 @@ def _iter_from_process_or_stream(cls, repo, proc_or_stream):
254
255
256
@classmethod
257
-defcreate_from_tree(cls,repo,tree,message,parent_commits=None,head=False):
+defcreate_from_tree(cls,repo,tree,message,parent_commits=None,head=False,author=None,committer=None):
258
"""Commit the given tree, creating a commit object.
259
260
:param repo: Repo object the commit should be part of
@@ -299,8 +299,13 @@ def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False):
299
cr=repo.config_reader()
300
env=os.environ
301
302
-committer=Actor.committer(cr)
303
-author=Actor.author(cr)
+ifauthorisNoneandcommitterisNone:
+committer=Actor.committer(cr)
304
+author=Actor.author(cr)
305
+elifauthorisNone:
306
307
+elifcommitterisNone:
308
309
310
# PARSE THE DATES
311
unix_time=int(time())