git: don't detect renames when calculating for local changes

This commit is contained in:
Kirill Likhodedov
2019-01-29 16:55:07 +03:00
parent 29332a3d38
commit 0141094bda
+2 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package git4idea;
import com.intellij.dvcs.DvcsUtil;
@@ -809,6 +809,7 @@ public class GitUtil {
public static boolean hasLocalChanges(boolean staged, Project project, VirtualFile root) throws VcsException {
GitLineHandler diff = new GitLineHandler(project, root, GitCommand.DIFF);
diff.addParameters("--name-only");
diff.addParameters("--no-renames");
if (staged) {
diff.addParameters("--cached");
}