Enforce prefixes "a/" and "b/" when doing git diff

The user can set different prefix using diff.mnemonicprefix or
diff.noprefix (see git-config(1)), so we need to force them to the
values that the diffeditor and PatchTool expect.

Task-number: QTCREATORBUG-13782
Change-Id: I3110a34b2575b89abe840e040690f3f0c36e955b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Thiago Macieira
2015-01-01 21:59:23 -02:00
parent d948408aac
commit 18b1d9270d

View File

@@ -270,6 +270,7 @@ void GitDiffHandler::addJob(VcsCommand *command,
args << QLatin1String("--ignore-space-change");
args << QLatin1String("--unified=") + QString::number(
m_controller->contextLinesNumber());
args << QLatin1String("--src-prefix=a/") << QLatin1String("--dst-prefix=b/");
args << arguments;
command->addJob(args, timeout());
}