diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-07-17 18:58:04 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-07-17 18:58:04 +0200 |
commit | 58c78e649cbac271dee187b055335c876fcb1937 (patch) | |
tree | 5c30bdc8849ae56b887a1da500f7e775b656d582 /git/index | |
parent | c3d33c113b1dfa4be7e3c9924fae029c178505c3 (diff) | |
parent | e3068025b64bee24efc1063aba5138708737c158 (diff) | |
download | gitpython-58c78e649cbac271dee187b055335c876fcb1937.tar.gz |
Merge pull request #317 from avinassh/dates-in-commits
Feature: Make commits with custom `author_date` and `commit_date` (closes #315)
Diffstat (limited to 'git/index')
-rw-r--r-- | git/index/base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git/index/base.py b/git/index/base.py index f8696800..b955dae4 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -922,7 +922,8 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): return out - def commit(self, message, parent_commits=None, head=True, author=None, committer=None): + def commit(self, message, parent_commits=None, head=True, author=None, + committer=None, author_date=None, commit_date=None): """Commit the current default index file, creating a commit object. For more information on the arguments, see tree.commit. @@ -932,7 +933,8 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): run_commit_hook('pre-commit', self) tree = self.write_tree() rval = Commit.create_from_tree(self.repo, tree, message, parent_commits, - head, author=author, committer=committer) + head, author=author, committer=committer, + author_date=author_date, commit_date=commit_date) run_commit_hook('post-commit', self) return rval |