Ensure to get only the right branch
This commit is contained in:
parent
9f02b1f264
commit
fdd85c9509
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,8 @@ def project_exists(project: str) -> bool:
|
||||||
def get_remote_hash(url: str, branch: str = "master") -> str:
|
def get_remote_hash(url: str, branch: str = "master") -> str:
|
||||||
|
|
||||||
gitcmd = git.cmd.Git()
|
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")
|
git_hash, branch = revision.split("\t")
|
||||||
return git_hash
|
return git_hash
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue