mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-09 21:59:58 +08:00
Handle multiline output better
This commit is contained in:
@@ -347,7 +347,7 @@ def rmdir(path):
|
||||
def git_branch_contains(cod, commit):
|
||||
cmd = ["git", "branch", "-r", "--contains", commit, "--sort", "-committerdate"]
|
||||
out, err = execute_cmd(cmd, cwd=cod, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
branch = out.strip().split("/")[1]
|
||||
branch = out.split()[0].split("/")[1]
|
||||
if " -> " in branch:
|
||||
branch = branch.split(" -> ")[0]
|
||||
return branch
|
||||
|
||||
Reference in New Issue
Block a user