3535)
3636from git .index import IndexFile
3737from git .objects import Submodule , RootModule , Commit
38+ from git .objects .util import utctz_to_altz
3839from git .refs import HEAD , Head , Reference , SymbolicReference , TagReference
3940from git .remote import Remote , _T_RemoteName , add_progress , to_progress_instance
4041from git .util import (
@@ -1363,11 +1364,13 @@ def blame_incremental(
13631364 safe_decode (props [b"author-mail" ].lstrip (b"<" ).rstrip (b">" )),
13641365 ),
13651366 authored_date = int (props [b"author-time" ]),
1367+ author_tz_offset = utctz_to_altz (props [b"author-tz" ].decode ("ascii" )),
13661368 committer = Actor (
13671369 safe_decode (props [b"committer" ]),
13681370 safe_decode (props [b"committer-mail" ].lstrip (b"<" ).rstrip (b">" )),
13691371 ),
13701372 committed_date = int (props [b"committer-time" ]),
1373+ committer_tz_offset = utctz_to_altz (props [b"committer-tz" ].decode ("ascii" )),
13711374 )
13721375 commits [hexsha ] = c
13731376 else :
@@ -1452,9 +1455,11 @@ class InfoTD(TypedDict, total=False):
14521455 author : str
14531456 author_email : str
14541457 author_date : int
1458+ author_tz_offset : int
14551459 committer : str
14561460 committer_email : str
14571461 committer_date : int
1462+ committer_tz_offset : int
14581463
14591464 info : InfoTD = {}
14601465
@@ -1504,20 +1509,24 @@ class InfoTD(TypedDict, total=False):
15041509 # committer Tom Preston-Werner
15051510 # committer-mail <tom@mojombo.com>
15061511 # committer-time 1192271832
1507- # committer-tz -0700 - IGNORED BY US
1512+ # committer-tz -0700
15081513 role = m .group (0 )
15091514 if role == "author" :
15101515 if firstpart .endswith ("-mail" ):
15111516 info ["author_email" ] = parts [- 1 ]
15121517 elif firstpart .endswith ("-time" ):
15131518 info ["author_date" ] = int (parts [- 1 ])
1519+ elif firstpart .endswith ("-tz" ):
1520+ info ["author_tz_offset" ] = utctz_to_altz (parts [- 1 ])
15141521 elif role == firstpart :
15151522 info ["author" ] = parts [- 1 ]
15161523 elif role == "committer" :
15171524 if firstpart .endswith ("-mail" ):
15181525 info ["committer_email" ] = parts [- 1 ]
15191526 elif firstpart .endswith ("-time" ):
15201527 info ["committer_date" ] = int (parts [- 1 ])
1528+ elif firstpart .endswith ("-tz" ):
1529+ info ["committer_tz_offset" ] = utctz_to_altz (parts [- 1 ])
15211530 elif role == firstpart :
15221531 info ["committer" ] = parts [- 1 ]
15231532 # END distinguish mail,time,name
@@ -1540,8 +1549,10 @@ class InfoTD(TypedDict, total=False):
15401549 hex_to_bin (sha ),
15411550 author = Actor ._from_string (f"{ info ['author' ]} { info ['author_email' ]} " ),
15421551 authored_date = info ["author_date" ],
1552+ author_tz_offset = info .get ("author_tz_offset" ),
15431553 committer = Actor ._from_string (f"{ info ['committer' ]} { info ['committer_email' ]} " ),
15441554 committed_date = info ["committer_date" ],
1555+ committer_tz_offset = info .get ("committer_tz_offset" ),
15451556 )
15461557 commits [sha ] = c
15471558 blames [- 1 ][0 ] = c
0 commit comments