Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d93100

Browse files
committed
util.get_user_id(): Will try a windows environment variable as well, the method now yields good results on all tested platforms
1 parent6942656 commit3d93100

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎lib/git/objects/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_user_id():
6060
""":return: string identifying the currently active system user as name@node
6161
:note: user can be set with the 'USER' environment variable, usually set on windows"""
6262
ukn='UNKNOWN'
63-
username=os.environ.get('USER',ukn)
63+
username=os.environ.get('USER',os.environ.get('USERNAME',ukn))
6464
ifusername==uknandhasattr(os,'getlogin'):
6565
username=os.getlogin()
6666
# END get username from login

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp