summaryrefslogtreecommitdiff
path: root/git/util.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-04-29 17:04:37 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-04-29 17:04:37 +0200
commit3fe1a7f87d511758adf2e56803cb3610b80c5f08 (patch)
tree3808cf15466a528ee3f266eb714f380aba2d9a7f /git/util.py
parenta80f9af7d3d18a657111061dcc1104d7a8aec64b (diff)
downloadgitpython-3fe1a7f87d511758adf2e56803cb3610b80c5f08.tar.gz
Moved rev_parse code into gitdb, this probably broke pretty much here, which is still to be fixed of course
Diffstat (limited to 'git/util.py')
-rw-r--r--git/util.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/git/util.py b/git/util.py
index 3d9fd7d5..a1d0cb12 100644
--- a/git/util.py
+++ b/git/util.py
@@ -9,7 +9,6 @@ import re
import sys
import time
import tempfile
-import platform
from gitdb.util import (
make_sha,
@@ -28,7 +27,8 @@ from gitdb.util import (
Actor,
Iterable,
stream_copy,
- IterableList
+ IterableList,
+ get_user_id
)
__all__ = ( "stream_copy", "join_path", "to_native_path_windows", "to_native_path_linux",
@@ -36,21 +36,6 @@ __all__ = ( "stream_copy", "join_path", "to_native_path_windows", "to_native_pat
"BlockingLockFile", "LockFile", 'Actor', 'get_user_id', 'assure_directory_exists',
'RemoteProgress', 'RepoAliasMixin')
-#{ Utility Methods
-
-
-def get_user_id():
- """:return: string identifying the currently active system user as name@node
- :note: user can be set with the 'USER' environment variable, usually set on windows"""
- ukn = 'UNKNOWN'
- username = os.environ.get('USER', os.environ.get('USERNAME', ukn))
- if username == ukn and hasattr(os, 'getlogin'):
- username = os.getlogin()
- # END get username from login
- return "%s@%s" % (username, platform.node())
-
-#} END utilities
-
#{ Classes
class RemoteProgress(object):