From f7cff58fd53bdb50fef857fdae65ee1230fd0061 Mon Sep 17 00:00:00 2001 From: Dries Date: Sun, 8 Dec 2019 15:20:29 +0100 Subject: Added parsing for '@1400000000 +0000' date format as used by git commit hooks. --- git/test/test_repo.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'git/test/test_repo.py') diff --git a/git/test/test_repo.py b/git/test/test_repo.py index c59203ed..ef28c74e 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -220,6 +220,12 @@ class TestRepo(TestBase): assert_equal(environment, cloned.git.environment()) + @with_rw_directory + def test_date_format(self, rw_dir): + repo = Repo.init(osp.join(rw_dir, "repo")) + # @-timestamp is the format used by git commit hooks + repo.index.commit("Commit messages", commit_date="@1400000000 +0000") + @with_rw_directory def test_clone_from_pathlib(self, rw_dir): if pathlib is None: # pythons bellow 3.4 don't have pathlib -- cgit v1.2.1