Commit b5987a6d authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Git: Require 1.8.0

Remove some workarounds for older versions

Git version in debian stable is 2.1.4, and in Ubuntu 14.04LTS is 1.9.1.

Change-Id: I8d558857a429149222b817401b98e90df10447b6
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 4a521392
......@@ -58,7 +58,7 @@
\row
\li Git
\li \l{http://git-scm.com/}
\li Git version 1.7.2, or later
\li Git version 1.8.0, or later
Gerrit version 2.6, or later
\row
......
......@@ -2838,11 +2838,8 @@ bool GitClient::synchronousSetTrackingBranch(const QString &workingDirectory,
{
QByteArray outputText;
QStringList arguments;
arguments << QLatin1String("branch");
if (gitVersion() >= 0x010800)
arguments << (QLatin1String("--set-upstream-to=") + tracking) << branch;
else
arguments << QLatin1String("--set-upstream") << branch << tracking;
arguments << QLatin1String("branch")
<< (QLatin1String("--set-upstream-to=") + tracking) << branch;
return vcsFullySynchronousExec(workingDirectory, arguments, &outputText);
}
......
......@@ -95,7 +95,7 @@ using namespace VcsBase;
namespace Git {
namespace Internal {
const unsigned minimumRequiredVersion = 0x010702;
const unsigned minimumRequiredVersion = 0x010800;
const char RC_GIT_MIME_XML[] = ":/git/Git.mimetypes.xml";
const VcsBaseEditorParameters editorParameters[] = {
......
......@@ -86,15 +86,7 @@ MergeTool::~MergeTool()
bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
{
QStringList arguments;
arguments << QLatin1String("mergetool") << QLatin1String("-y");
if (!files.isEmpty()) {
if (m_client->gitVersion() < 0x010708) {
Core::AsynchronousMessageBox::warning(tr("Error"),
tr("File input for the merge tool requires Git 1.7.8, or later."));
return false;
}
arguments << files;
}
arguments << QLatin1String("mergetool") << QLatin1String("-y") << files;
m_process = new MergeToolProcess(this);
m_process->setWorkingDirectory(workingDirectory);
const Utils::FileName binary = m_client->vcsBinary();
......
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