diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-08-06 14:03:14 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2021-08-13 07:23:14 +0000 |
commit | 47b15af0dab2650902501e497fc4481a1eef9060 (patch) | |
tree | aa0e0c5309faa05c0c3b94a25d3af12aa1644f1c /bin/git-gpush | |
parent | e85982c40f35906a832d81f2326f10b0207d6008 (diff) | |
download | qtrepotools-47b15af0dab2650902501e497fc4481a1eef9060.tar.gz |
gpush/gpick: Use resolved Gerrit URL for both pushing and fetching changes
The user might have set up a remote with a separate push URL, e.g.:
[url "git://code.qt.io/"]
insteadOf = qt-project:
[url "ssh://codereview.qt-project.org/"]
pushInsteadOf = qt-project:
We resolve the Gerrit URL and host in set_gerrit_config(), by taking
insteadOf and pushInsteadOf into account. By using the resolved URL
instead of the remote name when fetching we ensure that we always hit
the Gerrit server. Without this git-gpick will fail.
Change-Id: I580f01b8615c9d9fe5961036b8bb260ef62c8261
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'bin/git-gpush')
-rwxr-xr-x | bin/git-gpush | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/git-gpush b/bin/git-gpush index a0884af..8fd7d67 100755 --- a/bin/git-gpush +++ b/bin/git-gpush @@ -1812,7 +1812,7 @@ sub push_fragment($$) push @gitcmd, '-q' if ($quiet); push @gitcmd, '-n' if ($dry_run); push @gitcmd, map { ("-o", "$_") } @push_options; - push @gitcmd, $remote, "$tip:refs/for/$to"; + push @gitcmd, $gerrit_url, "$tip:refs/for/$to"; run_process(FWD_OUTPUT, @gitcmd); } |