summaryrefslogtreecommitdiff
path: root/src/plugins/git/gerrit/gerritplugin.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-05-06 19:37:16 +0300
committerOrgad Shaneh <orgads@gmail.com>2013-05-07 11:50:51 +0200
commit566d3d9d9bdb44b4463b27141302c665fb7fedcf (patch)
treece5d94e25218f3f44e53bb6204ea6529ece56289 /src/plugins/git/gerrit/gerritplugin.cpp
parentcd2722b1a000556a9d415b59120dc59258493893 (diff)
downloadqt-creator-566d3d9d9bdb44b4463b27141302c665fb7fedcf.tar.gz
Git: Enable commit selection in Push to Gerrit dialog
Change-Id: Ie0ca8322858ac75d4bacf8b3efe66fa40577e3a2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Diffstat (limited to 'src/plugins/git/gerrit/gerritplugin.cpp')
-rw-r--r--src/plugins/git/gerrit/gerritplugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp
index 0bed423f4f..9462068e7d 100644
--- a/src/plugins/git/gerrit/gerritplugin.cpp
+++ b/src/plugins/git/gerrit/gerritplugin.cpp
@@ -405,7 +405,10 @@ void GerritPlugin::push()
}
args << dialog->selectedRemoteName();
- QString target = QLatin1String("HEAD:refs/") + dialog->selectedPushType() +
+ QString target = dialog->selectedCommit();
+ if (target.isEmpty())
+ target = QLatin1String("HEAD");
+ target += QLatin1String(":refs/") + dialog->selectedPushType() +
QLatin1Char('/') + dialog->selectedRemoteBranchName();
const QString topic = dialog->selectedTopic();
if (!topic.isEmpty())