Commit 44f14351 authored by Petar Perisin's avatar Petar Perisin
Browse files

Git - command in progress in Topic

Change-Id: I83a00e9677924efc244a91d20cdded77ee9cdff0
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <>
parent 311ca8cd
......@@ -1264,6 +1264,20 @@ QString GitClient::synchronousTopic(const QString &workingDirectory)
if (!branch.isEmpty())
return data.topic = branch;
switch (checkCommandInProgressInGitDir(gitDir)) {
case Rebase:
case RebaseMerge:
return data.topic = tr("Rebasing");
case Revert:
return data.topic = tr("Reverting");
case CherryPick:
return data.topic = tr("Cherry Picking");
case Merge:
return data.topic = tr("Merging");
// Detached HEAD, try a tag or remote branch
QStringList references;
if (!synchronousHeadRefs(workingDirectory, &references))
......@@ -1892,10 +1906,8 @@ GitClient::StatusResult GitClient::gitStatus(const QString &workingDirectory, St
return StatusUnchanged;
GitClient::CommandInProgress GitClient::checkCommandInProgress(const QString &workingDirectory)
GitClient::CommandInProgress GitClient::checkCommandInProgressInGitDir(const QString &gitDir)
QString gitDir = findGitDirForRepository(workingDirectory);
if (QFile::exists(gitDir + QLatin1String("/MERGE_HEAD")))
return Merge;
else if (QFile::exists(gitDir + QLatin1String("/rebase-apply/rebasing")))
......@@ -1910,6 +1922,11 @@ GitClient::CommandInProgress GitClient::checkCommandInProgress(const QString &wo
return NoCommand;
GitClient::CommandInProgress GitClient::checkCommandInProgress(const QString &workingDirectory)
return checkCommandInProgressInGitDir(findGitDirForRepository(workingDirectory));
void GitClient::continueCommandIfNeeded(const QString &workingDirectory)
switch (checkCommandInProgress(workingDirectory)) {
......@@ -281,6 +281,8 @@ public:
QString *errorMessage = 0);
CommandInProgress checkCommandInProgress(const QString &workingDirectory);
CommandInProgress checkCommandInProgressInGitDir(const QString &gitDir);
void continueCommandIfNeeded(const QString &workingDirectory);
void continuePreviousGitCommand(const QString &workingDirectory, const QString &msgBoxTitle, QString msgBoxText,
const QString &buttonName, const QString &gitCommand, bool requireChanges = true);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment