@@ -276,14 +276,17 @@ def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False,
276276 If True, the HEAD will be advanced to the new commit automatically.
277277 Else the HEAD will remain pointing on the previous commit. This could
278278 lead to undesired results when diffing files.
279+ :param author: The name of the author, optional. If unset, the repository
280+ configuration is used to obtain this value.
281+ :param committer: The name of the committer, optional. If unset, the
282+ repository configuration is used to obtain this value.
279283
280284 :return: Commit object representing the new commit
281285
282286 :note:
283287 Additional information about the committer and Author are taken from the
284288 environment or from the git configuration, see git-commit-tree for
285289 more information"""
286- parents = parent_commits
287290if parent_commits is None :
288291try :
289292parent_commits = [repo .head .commit ]
@@ -357,7 +360,6 @@ def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False,
357360except ValueError :
358361# head is not yet set to the ref our HEAD points to
359362# Happens on first commit
360- import git .refs
361363master = git .refs .Head .create (repo ,repo .head .ref ,new_commit ,logmsg = "commit (initial): %s" % message )
362364repo .head .set_reference (master ,logmsg = 'commit: Switching to %s' % master )
363365# END handle empty repositories