From 53caba0307b908f7008e8be8588d5b734f946074 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 5 Jun 2019 09:22:03 +0200 Subject: Fix adding reviewers and CCs in git-gpush This stopped working after The Big Gerrit Upgrade. Our Gerrit instance supports adding reviewers and CCs via push options now. Fixes: QTQAINFRA-2998 Change-Id: Ic87a1b2875c8a170de2259e1805e8837468ac3e8 Reviewed-by: Oliver Wolff --- bin/git-gpush | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/git-gpush b/bin/git-gpush index d2db42d..841a60f 100755 --- a/bin/git-gpush +++ b/bin/git-gpush @@ -519,16 +519,15 @@ sub push_patches() print "Pushing $ref_from for $ref_to on $remote ...\n" if (!$quiet); - my @git_recv_args; - push @git_recv_args, map { "--reviewer=$_" } @reviewers; - push @git_recv_args, map { "--cc=$_" } @CCs; + my @push_options; + push @push_options, map { "r=$_" } @reviewers; + push @push_options, map { "cc=$_" } @CCs; my @gitcmd = ("git", "push"); push @gitcmd, '-v' if ($verbose); push @gitcmd, '-q' if ($quiet); push @gitcmd, '-n' if ($dry_run); - push @gitcmd, join(' ', "--receive-pack=git receive-pack", @git_recv_args) - if (@git_recv_args); + push @gitcmd, map { ("-o", "$_") } @push_options; push @gitcmd, $remote, "$ref_from:refs/".($draft > 0 ? 'drafts' : 'for')."/$ref_to"; run_process(FWD_OUTPUT, @gitcmd); -- cgit v1.2.3