Skip to content

add author and committer in params of the commit function #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 17, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update commit function
  • Loading branch information
dralliw committed Mar 24, 2014
commit 9d0473c1d1e6cadd986102712fff9196fff96212
4 changes: 2 additions & 2 deletions git/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def move(self, items, skip_errors=False, **kwargs):

return out

def commit(self, message, parent_commits=None, head=True):
def def commit(self, message, parent_commits=None, head=True, author=None, committer=None):
"""Commit the current default index file, creating a commit object.

For more information on the arguments, see tree.commit.
Expand All @@ -884,7 +884,7 @@ def commit(self, message, parent_commits=None, head=True):
:return:
Commit object representing the new commit"""
tree = self.write_tree()
return Commit.create_from_tree(self.repo, tree, message, parent_commits, head)
return Commit.create_from_tree(self.repo, tree, message, parent_commits, head, author=author, committer=committer)

@classmethod
def _flush_stdin_and_wait(cls, proc, ignore_stdout = False):
Expand Down