From a7e5367dcdf76824033f1dd8ea8c8c3477c9db9d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sun, 3 May 2020 21:33:30 +0200 Subject: [PATCH] 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 --- mirror_from_pagure_bus.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mirror_from_pagure_bus.py b/mirror_from_pagure_bus.py index a6dd6eb..59ef4d3 100644 --- a/mirror_from_pagure_bus.py +++ b/mirror_from_pagure_bus.py @@ -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)