From 83a6477b45f55afb0c624203628b1fe94af8b746 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 24 Dec 2009 10:26:55 -0800 Subject: [PATCH] Allow pushing to more than two remotes. --- lib/hub/commands.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/hub/commands.rb b/lib/hub/commands.rb index 4dab38a1..db63636a 100644 --- a/lib/hub/commands.rb +++ b/lib/hub/commands.rb @@ -99,9 +99,13 @@ module Hub remotes = args[1].split(',') args[1] = remotes.shift - while remotes.length > 0 do - args.after "git push #{remotes.shift} #{branch}" + after = "git push #{remotes.shift} #{branch}" + + while remotes.length > 0 + after += "; git push #{remotes.shift} #{branch}" end + + args.after after end def alias(args) -- GitLab