Git - refactor executeGit and remove unnecessary args

Change-Id: Idf770a20db66191b4d7fe3a704d31bdce70505c5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Petar Perisin
2013-06-03 23:16:49 +02:00
parent 80a7107691
commit dd7c2e622e
2 changed files with 5 additions and 9 deletions

View File

@@ -1245,7 +1245,7 @@ void GitClient::blame(const QString &workingDirectory,
arguments << QLatin1String("--") << fileName; arguments << QLatin1String("--") << fileName;
if (!revision.isEmpty()) if (!revision.isEmpty())
arguments << revision; arguments << revision;
executeGit(workingDirectory, arguments, editor, false, VcsBase::Command::NoReport, lineNumber); executeGit(workingDirectory, arguments, editor, false, lineNumber);
} }
bool GitClient::synchronousCheckout(const QString &workingDirectory, bool GitClient::synchronousCheckout(const QString &workingDirectory,
@@ -2130,15 +2130,13 @@ VcsBase::Command *GitClient::executeGit(const QString &workingDirectory,
const QStringList &arguments, const QStringList &arguments,
VcsBase::VcsBaseEditorWidget* editor, VcsBase::VcsBaseEditorWidget* editor,
bool useOutputToWindow, bool useOutputToWindow,
VcsBase::Command::TerminationReportMode tm, int editorLineNumber)
int editorLineNumber,
bool unixTerminalDisabled)
{ {
outputWindow()->appendCommand(workingDirectory, settings()->stringValue(GitSettings::binaryPathKey), arguments); outputWindow()->appendCommand(workingDirectory, settings()->stringValue(GitSettings::binaryPathKey), arguments);
VcsBase::Command *command = createCommand(workingDirectory, editor, useOutputToWindow, editorLineNumber); VcsBase::Command *command = createCommand(workingDirectory, editor, useOutputToWindow, editorLineNumber);
command->addJob(arguments, settings()->intValue(GitSettings::timeoutKey)); command->addJob(arguments, settings()->intValue(GitSettings::timeoutKey));
command->setTerminationReportMode(tm); command->setTerminationReportMode(VcsBase::Command::NoReport);
command->setUnixTerminalDisabled(unixTerminalDisabled); command->setUnixTerminalDisabled(false);
command->execute(); command->execute();
return command; return command;
} }

View File

@@ -356,9 +356,7 @@ private:
const QStringList &arguments, const QStringList &arguments,
VcsBase::VcsBaseEditorWidget* editor = 0, VcsBase::VcsBaseEditorWidget* editor = 0,
bool useOutputToWindow = false, bool useOutputToWindow = false,
VcsBase::Command::TerminationReportMode tm = VcsBase::Command::NoReport, int editorLineNumber = -1);
int editorLineNumber = -1,
bool unixTerminalDisabled = false);
// Fully synchronous git execution (QProcess-based). // Fully synchronous git execution (QProcess-based).
bool fullySynchronousGit(const QString &workingDirectory, bool fullySynchronousGit(const QString &workingDirectory,