When pushing to other remotes, ignore 'origin'

Since we just fetched from 'origin' there is no point trying to
push again there.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-05-03 21:33:30 +02:00
parent 3951266e79
commit a7e5367dcd

View file

@ -116,6 +116,8 @@ class MirrorFromPagure(object):
output = run_command(cmd, cwd=dest_folder).decode("utf-8").strip()
if output:
for remote in output.split("\n"):
if remote == "origin":
continue
_log.info(" Running git push --mirror against %s", remote)
cmd = ["git", "push", "--mirror", remote]
run_command(cmd, cwd=dest_folder)