Git: Allow push after fixup

Direct push after fixup is really useful, especially on gerrit, because
it allows easy fixing and direct pushing commits under HEAD.

Change-Id: I83980e451c9ae86ac1ac0a55170d6d4141f27d49
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Petar Perisin
2013-09-30 01:46:10 +02:00
parent abfa553986
commit 6c61559399
5 changed files with 31 additions and 8 deletions

View File

@@ -1132,8 +1132,10 @@ bool GitPlugin::submitEditorAboutToClose()
return false;
cleanCommitMessageFile();
if (commitType == FixupCommit) {
if (!m_gitClient->beginStashScope(m_submitRepository, QLatin1String("Rebase-fixup"), NoPrompt))
if (!m_gitClient->beginStashScope(m_submitRepository, QLatin1String("Rebase-fixup"),
NoPrompt, editor->panelData().pushAction)) {
return false;
}
m_gitClient->interactiveRebase(m_submitRepository, amendSHA1, true);
} else {
m_gitClient->continueCommandIfNeeded(m_submitRepository);
@@ -1506,6 +1508,11 @@ GitClient *GitPlugin::gitClient() const
return m_gitClient;
}
Gerrit::Internal::GerritPlugin *GitPlugin::gerritPlugin() const
{
return m_gerritPlugin;
}
#ifdef WITH_TESTS
#include <QTest>