forked from qt-creator/qt-creator
Simplify code
Change-Id: I1576c3b8d370fdae660a399654b77af11a5f5d36 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
@@ -819,14 +819,12 @@ void GitClient::diff(const QString &workingDirectory,
|
|||||||
if (unstagedFileNames.empty() && stagedFileNames.empty()) {
|
if (unstagedFileNames.empty() && stagedFileNames.empty()) {
|
||||||
// local repository diff
|
// local repository diff
|
||||||
handler->diffRepository();
|
handler->diffRepository();
|
||||||
|
} else if (!stagedFileNames.empty()) {
|
||||||
|
// diff of selected files only with --cached option, used in commit editor
|
||||||
|
handler->diffFiles(stagedFileNames, unstagedFileNames);
|
||||||
} else {
|
} else {
|
||||||
if (!stagedFileNames.empty()) {
|
// current project diff
|
||||||
// diff of selected files only with --cached option, used in commit editor
|
handler->diffProjects(unstagedFileNames);
|
||||||
handler->diffFiles(stagedFileNames, unstagedFileNames);
|
|
||||||
} else if (!unstagedFileNames.empty()) {
|
|
||||||
// current project diff
|
|
||||||
handler->diffProjects(unstagedFileNames);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const QString binary = settings()->stringValue(GitSettings::binaryPathKey);
|
const QString binary = settings()->stringValue(GitSettings::binaryPathKey);
|
||||||
|
|||||||
Reference in New Issue
Block a user