Added parsing for '@1400000000 +0000' date format as used by git commit hooks by dries007 · Pull Request #965 · gitpython-developers/GitPython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions AUTHORS
2 changes: 2 additions & 0 deletions git/objects/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions git/test/test_repo.py