mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-191309 git: update staging area using "--cached" argument on commit
fix "error: the following file has local modifications" on attempt to call `git rm -- <before-rename path>` on a renamed file, excluded from commit. This might be caused by git pre-commit-hook, that created file with that path during the commit. (so no now it is a modification + new file, and not a rename).
This commit is contained in:
@@ -658,7 +658,7 @@ public class GitCheckinEnvironment implements CheckinEnvironment {
|
||||
}
|
||||
if (!removed.isEmpty()) {
|
||||
try {
|
||||
GitFileUtils.delete(project, root, removed, "--ignore-unmatch");
|
||||
GitFileUtils.delete(project, root, removed, "--ignore-unmatch", "--cached");
|
||||
}
|
||||
catch (VcsException ex) {
|
||||
exceptions.add(ex);
|
||||
|
||||
Reference in New Issue
Block a user