diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-10-14 12:03:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-14 12:03:22 +0800 |
commit | 183cf3509f2a1646daaca1874594a27abb408deb (patch) | |
tree | 06345354b76ec5e66e1e8bf5368e46d6712173c0 /git/index/base.py | |
parent | 19aaa74aafc06663644d634f33bb8af871d58536 (diff) | |
parent | 8f51abd30647c9dfe857621ab97f52d3e5f2fbd9 (diff) | |
download | gitpython-183cf3509f2a1646daaca1874594a27abb408deb.tar.gz |
Merge pull request #1501 from SergeantMenacingGarlic/date_types
Add datetime.datetime type to commit_date and author_date
Diffstat (limited to 'git/index/base.py')
-rw-r--r-- | git/index/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git/index/base.py b/git/index/base.py index 10f8b8b2..17d18db5 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -4,6 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php +import datetime import glob from io import BytesIO import os @@ -1032,8 +1033,8 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable): head: bool = True, author: Union[None, "Actor"] = None, committer: Union[None, "Actor"] = None, - author_date: Union[str, None] = None, - commit_date: Union[str, None] = None, + author_date: Union[datetime.datetime, str, None] = None, + commit_date: Union[datetime.datetime, str, None] = None, skip_hooks: bool = False, ) -> Commit: """Commit the current default index file, creating a commit object. |