fix get_git_remote with multiple branches
This commit is contained in:
parent
ca58660376
commit
ebd9092788
1 changed files with 3 additions and 1 deletions
|
@ -29,7 +29,9 @@ async def get_git_branch():
|
|||
|
||||
async def get_git_remote():
|
||||
remote = await create_subprocess("git", "branch", "-vv")
|
||||
return remote.split("[")[1].split("]")[0]
|
||||
for line in remote.split("\n"):
|
||||
if "*" in line:
|
||||
return line.split("[")[1].split("]")[0]
|
||||
|
||||
|
||||
async def get_git_head_diff_branch(branch: str) -> str:
|
||||
|
|
Loading…
Reference in a new issue