Commit 27b0fd81 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Do not show diff for all staged files when unstaged requested



For example git rm somefile and modify another, then open the commit
editor and double-click the modified file.

Change-Id: I8c7044b4279192b95dcff4d63f48228ec4960f63
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent c1833861
......@@ -171,11 +171,13 @@ void GitDiffHandler::diffFiles(const QStringList &stagedFileNames,
{
QList<QStringList> arguments;
QStringList stagedArguments;
stagedArguments << QLatin1String("--cached");
stagedArguments << QLatin1String("--");
stagedArguments << stagedFileNames;
arguments << stagedArguments;
if (!stagedFileNames.isEmpty()) {
QStringList stagedArguments;
stagedArguments << QLatin1String("--cached");
stagedArguments << QLatin1String("--");
stagedArguments << stagedFileNames;
arguments << stagedArguments;
}
if (!unstagedFileNames.isEmpty()) {
QStringList unstagedArguments = addHeadWhenCommandInProgress();
......
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