Git: Offer creating remote branch if push fails due to the lack of it

If git push fails because the remote branch does not exists a dialog
will be shown which will allow the creation of the remote branch without
leaving the IDE (by executing the git push --set-upstream .. command
suggested by the git itself).

Fixes: QTCREATORBUG-21154
Change-Id: Id785fdc64e27865fba2255eafd2043367a5835ea
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Miklós Márton
2019-12-11 21:31:39 +01:00
parent 5cebf2a79a
commit 5ef320d9fc
2 changed files with 65 additions and 13 deletions

View File

@@ -78,6 +78,11 @@ enum StashFlag {
NoPrompt = 0x02
};
enum PushFailure {
NonFastForward,
NoRemoteBranch
};
class SubmoduleData
{
public:
@@ -381,6 +386,7 @@ private:
QString m_gitQtcEditor;
QMap<QString, StashInfo> m_stashInfo;
QString m_pushFallbackCommand;
QStringList m_updatedSubmodules;
bool m_disableEditor;
QFutureSynchronizer<void> m_synchronizer; // for commit updates