Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/git/git
/ currentGitBranch
Function
currentGitBranch
git-p4.py:985–986 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
983
984
985
def
currentGitBranch():
986
return
read_pipe_text([
"git"
,
"symbolic-ref"
,
"--short"
,
"-q"
,
"HEAD"
])
987
988
989
def
isValidGitDir(path):
Callers
2
run
Method · 0.85
run
Method · 0.85
Calls
1
read_pipe_text
Function · 0.85
Tested by
no test coverage detected