diff --git a/plugins/git4idea/src/git4idea/repo/GitUntrackedFilesHolder.java b/plugins/git4idea/src/git4idea/repo/GitUntrackedFilesHolder.java index ab32ef61a683..3f98d2435806 100644 --- a/plugins/git4idea/src/git4idea/repo/GitUntrackedFilesHolder.java +++ b/plugins/git4idea/src/git4idea/repo/GitUntrackedFilesHolder.java @@ -300,13 +300,9 @@ public class GitUntrackedFilesHolder implements Disposable, AsyncVfsEventsListen if (event instanceof VFileCreateEvent) { return ((VFileCreateEvent)event).getParent().isValid() ? event.getFile() : null; } - else if (event instanceof VFileDeleteEvent || event instanceof VFileMoveEvent || isRename(event)) { + if (event instanceof VFileCopyEvent || event instanceof VFileDeleteEvent || event instanceof VFileMoveEvent || isRename(event)) { return event.getFile(); } - else if (event instanceof VFileCopyEvent) { - VFileCopyEvent copyEvent = (VFileCopyEvent) event; - return copyEvent.getNewParent().findChild(copyEvent.getNewChildName()); - } return null; }); }