File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -37,5 +37,6 @@ Contributors are:
3737-Anil Khatri <anil.soccer.khatri _at_ gmail.com>
3838-JJ Graham <thetwoj _at_ gmail.com>
3939-Ben Thayer <ben _at_ benthayer.com>
40+ -Dries Kennes <admin _at_ dries007.net>
4041
4142Portions derived from other open source works and are clearly marked.
Original file line number Diff line number Diff line change @@ -148,6 +148,8 @@ def parse_date(string_date):
148148 try :
149149 if string_date .count (' ' ) == 1 and string_date .rfind (':' ) == - 1 :
150150 timestamp , offset = string_date .split ()
151+ if timestamp .startswith ('@' ):
152+ timestamp = timestamp [1 :]
151153 timestamp = int (timestamp )
152154 return timestamp , utctz_to_altz (verify_utctz (offset ))
153155 else :
Original file line number Diff line number Diff line change @@ -220,6 +220,12 @@ def test_clone_from_keeps_env(self, rw_dir):
220220
221221 assert_equal (environment , cloned .git .environment ())
222222
223+ @with_rw_directory
224+ def test_date_format (self , rw_dir ):
225+ repo = Repo .init (osp .join (rw_dir , "repo" ))
226+ # @-timestamp is the format used by git commit hooks
227+ repo .index .commit ("Commit messages" , commit_date = "@1400000000 +0000" )
228+
223229 @with_rw_directory
224230 def test_clone_from_pathlib (self , rw_dir ):
225231 if pathlib is None : # pythons bellow 3.4 don't have pathlib
You can’t perform that action at this time.
0 commit comments