summaryrefslogtreecommitdiff
path: root/git/objects/util.py
diff options
context:
space:
mode:
authorDries <admin@dries007.net>2019-12-08 15:20:29 +0100
committerSebastian Thiel <sebastian.thiel@icloud.com>2019-12-29 11:23:41 +0800
commitf7cff58fd53bdb50fef857fdae65ee1230fd0061 (patch)
tree2fb9d6af85b9e1b58daa6a47b66cf4233fe5a797 /git/objects/util.py
parent313b3b4425012528222e086b49359dacad26d678 (diff)
downloadgitpython-f7cff58fd53bdb50fef857fdae65ee1230fd0061.tar.gz
Added parsing for '@1400000000 +0000' date format as used by git commit hooks.
Diffstat (limited to 'git/objects/util.py')
-rw-r--r--git/objects/util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/git/objects/util.py b/git/objects/util.py
index 5dbd9822..235b520e 100644
--- a/git/objects/util.py
+++ b/git/objects/util.py
@@ -148,6 +148,8 @@ def parse_date(string_date):
try:
if string_date.count(' ') == 1 and string_date.rfind(':') == -1:
timestamp, offset = string_date.split()
+ if timestamp.startswith('@'):
+ timestamp = timestamp[1:]
timestamp = int(timestamp)
return timestamp, utctz_to_altz(verify_utctz(offset))
else: