fix get_git_remote with multiple branches

This commit is contained in:
Riley Housden 2022-08-20 01:09:56 -04:00
parent ca58660376
commit ebd9092788
Signed by: InValidFire
GPG Key ID: 0D6208F6DF56B4D8
1 changed files with 3 additions and 1 deletions

View File

@ -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: