forked from qt-creator/qt-creator
Git: Refactor reset
Remove enum, provide the associated flag in the combobox. Change-Id: I1c4751c75f59312904fe7c175678f965ac16741d Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
cbfeb36ce7
commit
e6da908321
@@ -869,10 +869,10 @@ bool GitClient::synchronousCheckout(const QString &workingDirectory,
|
||||
return true;
|
||||
}
|
||||
|
||||
void GitClient::hardReset(const QString &workingDirectory, const QString &commit)
|
||||
void GitClient::reset(const QString &workingDirectory, const QString &argument, const QString &commit)
|
||||
{
|
||||
QStringList arguments;
|
||||
arguments << QLatin1String("reset") << QLatin1String("--hard");
|
||||
arguments << QLatin1String("reset") << argument;
|
||||
if (!commit.isEmpty())
|
||||
arguments << commit;
|
||||
|
||||
@@ -880,18 +880,6 @@ void GitClient::hardReset(const QString &workingDirectory, const QString &commit
|
||||
connectRepositoryChanged(workingDirectory, cmd);
|
||||
}
|
||||
|
||||
void GitClient::softReset(const QString &workingDirectory, const QString &commit)
|
||||
{
|
||||
if (commit.isEmpty())
|
||||
return;
|
||||
|
||||
QStringList arguments;
|
||||
arguments << QLatin1String("reset") << QLatin1String("--soft") << commit;
|
||||
|
||||
VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true);
|
||||
connectRepositoryChanged(workingDirectory, cmd);
|
||||
}
|
||||
|
||||
void GitClient::addFile(const QString &workingDirectory, const QString &fileName)
|
||||
{
|
||||
QStringList arguments;
|
||||
|
||||
Reference in New Issue
Block a user