summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-06-05 09:22:03 +0200
committerJörg Bornemann <joerg.bornemann@qt.io>2019-06-06 05:57:13 +0000
commit53caba0307b908f7008e8be8588d5b734f946074 (patch)
tree360c4580acda4d6517317c490c2770961c048919
parentf6f2b04bd1dbeae3bdaaf683357087296ab37393 (diff)
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 <oliver.wolff@qt.io>
-rwxr-xr-xbin/git-gpush9
1 files 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);