Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/git-p4.py b/git-p4.py
index 584b817757..8d151da91b 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -602,12 +602,7 @@ def p4Where(depotPath):
return clientPath
def currentGitBranch():
- retcode = system(["git", "symbolic-ref", "-q", "HEAD"], ignore_error=True)
- if retcode != 0:
- # on a detached head
- return None
- else:
- return read_pipe(["git", "name-rev", "HEAD"]).split(" ")[1].strip()
+ return read_pipe_text(["git", "symbolic-ref", "--short", "-q", "HEAD"])
def isValidGitDir(path):
return git_dir(path) != None