From fdd85c9509d4d0993611bdd7980bdfe4657e0edb Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sat, 15 Jan 2022 17:00:16 +0100 Subject: [PATCH] Ensure to get only the right branch --- obs/update_unstable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/obs/update_unstable.py b/obs/update_unstable.py index f3378fb..636898c 100755 --- a/obs/update_unstable.py +++ b/obs/update_unstable.py @@ -45,7 +45,8 @@ def project_exists(project: str) -> bool: def get_remote_hash(url: str, branch: str = "master") -> str: gitcmd = git.cmd.Git() - revision = gitcmd.ls_remote(url, branch, quiet=True, refs=True) + revision = gitcmd.ls_remote(url, f"refs/heads/{branch}", + quiet=True, refs=True) git_hash, branch = revision.split("\t") return git_hash