Codebase list python-git / 1009c22
New upstream version 3.1.11 TANIGUCHI Takaki 3 years ago
6 changed file(s) with 33 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
00 Metadata-Version: 1.2
11 Name: GitPython
2 Version: 3.1.9
2 Version: 3.1.11
33 Summary: Python Git Library
44 Home-page: https://github.com/gitpython-developers/GitPython
55 Author: Sebastian Thiel, Michael Trier
00 Metadata-Version: 1.2
11 Name: GitPython
2 Version: 3.1.9
2 Version: 3.1.11
33 Summary: Python Git Library
44 Home-page: https://github.com/gitpython-developers/GitPython
55 Author: Sebastian Thiel, Michael Trier
0 3.1.9
0 3.1.11
00 =========
11 Changelog
22 =========
3
4 3.1.11
5 ======
6
7 Fixes regression of 3.1.10.
8
9 See the following for details:
10 https://github.com/gitpython-developers/gitpython/milestone/43?closed=1*
11
12 3.1.10
13 ======
14
15 See the following for details:
16 https://github.com/gitpython-developers/gitpython/milestone/42?closed=1*
17
318
419 3.1.9
520 =====
1111 import os.path as osp
1212
1313
14 __version__ = '3.1.9'
14 __version__ = '3.1.11'
1515
1616
1717 #{ Initialization
1818 def _init_externals():
1919 """Initialize external projects by putting them into the path"""
20 if __version__ == '3.1.9' and 'PYOXIDIZER' not in os.environ:
21 sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb'))
20 if __version__ == '3.1.11' and 'PYOXIDIZER' not in os.environ:
21 sys.path.insert(1, osp.join(osp.dirname(__file__), 'ext', 'gitdb'))
2222
2323 try:
2424 import gitdb
581581 @classmethod
582582 def _main_actor(cls, env_name, env_email, config_reader=None):
583583 actor = Actor('', '')
584 default_email = get_user_id()
585 default_name = default_email.split('@')[0]
584 user_id = None # We use this to avoid multiple calls to getpass.getuser()
585
586 def default_email():
587 nonlocal user_id
588 if not user_id:
589 user_id = get_user_id()
590 return user_id
591
592 def default_name():
593 return default_email().split('@')[0]
586594
587595 for attr, evar, cvar, default in (('name', env_name, cls.conf_name, default_name),
588596 ('email', env_email, cls.conf_email, default_email)):
591599 setattr(actor, attr, val)
592600 except KeyError:
593601 if config_reader is not None:
594 setattr(actor, attr, config_reader.get_value('user', cvar, default))
602 setattr(actor, attr, config_reader.get_value('user', cvar, default()))
595603 # END config-reader handling
596604 if not getattr(actor, attr):
597 setattr(actor, attr, default)
605 setattr(actor, attr, default())
598606 # END handle name
599607 # END for each item to retrieve
600608 return actor