Skip to content
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

Added parsing for '@1400000000 +0000' date format as used by git commit hooks #965

merged 1 commit into from Dec 29, 2019


Copy link

dries007 commented Dec 8, 2019

The git pre-commit hook is run with the GIT_AUTHOR_DATE environment variable set.
The format used (on my machine anyway) is @1574863356 +0100, which is not handles correctly by parse_date.

This PR fixes that crash, but it doesn't quite fully resolve issue #963. This issue also contains steps to reproduce and a stacktrace.

@Byron Byron added the acknowledged label Dec 29, 2019
@Byron Byron added this to the v3.0.6 - Bugfixes milestone Dec 29, 2019

This comment has been minimized.

Copy link

Byron commented Dec 29, 2019

Apologies for the late response!
Thanks a lot for your contribution, it's much appreciated!

@Byron Byron merged commit f7cff58 into gitpython-developers:master Dec 29, 2019
1 of 3 checks passed
1 of 3 checks passed
DeepSource: Python Analysis Failed: Issues detected that need attention.
continuous-integration/appveyor/pr AppVeyor build failed
continuous-integration/travis-ci/pr The Travis CI build passed
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Mar 7, 2020

* Switched back to using gitdb package as requirement
  (`gitdb#59 <>`_)


* Restricted GitDB (gitdb2) version requirement to < 4
* Removed old nose library from test requirements


* Changed to use UTF-8 instead of default encoding when getting information about a symbolic reference
  (`#774 <>`_)
* Fixed decoding of tag object message so as to replace invalid bytes
  (`#943 <>`_)


* Added support for Python 3.8
* Bumped GitDB (gitdb2) version requirement to > 3


* Fixed Repo.__repr__ when subclassed
  (`#968 <>`_)
* Removed compatibility shims for Python < 3.4 and old mock library
* Replaced usage of deprecated unittest aliases and Logger.warn
* Removed old, no longer used assert methods
* Replaced usage of nose assert methods with unittest


Properly signed re-release of v3.0.6 with new signature
(See `#980 <>`_)


| Note: There was an issue that caused this version to be released to PyPI without a signature
| See the changelog for v3.0.7 and `#980 <>`_


* Fixed warning for usage of environment variables for paths containing ``$`` or ``%``
  (`#832 <>`_,
  `#961 <>`_)
* Added support for parsing Git internal date format (@<unix timestamp> <timezone offset>)
  (`#965 <>`_)
* Removed Python 2 and < 3.3 compatibility shims
  (`#979 <>`_)
* Fixed GitDB (gitdb2) requirement version specifier formatting in requirements.txt
  (`#979 <>`_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.