git: only list heads and tags references
When looking for git source references, we only need the heads. This reduce the load of using https://opendev.org/zuul/zuul-jobs which now contains all the gerrit refs. Change-Id: I72532592312062dee17f095f3d56866d16e429dc
This commit is contained in:
parent
af910d9d8e
commit
ef69d2a6d8
|
@ -184,6 +184,7 @@ class GitConnection(BaseConnection):
|
||||||
refs = {}
|
refs = {}
|
||||||
client = git.cmd.Git()
|
client = git.cmd.Git()
|
||||||
output = client.ls_remote(
|
output = client.ls_remote(
|
||||||
|
"--heads", "--tags",
|
||||||
os.path.join(self.baseurl, project))
|
os.path.join(self.baseurl, project))
|
||||||
for line in output.splitlines():
|
for line in output.splitlines():
|
||||||
sha, ref = line.split('\t')
|
sha, ref = line.split('\t')
|
||||||
|
|
Loading…
Reference in New Issue