boolean (@NotNull VirtualFile root, @NotNull VirtualFile checkForIgnore) { // check-ignore was introduced in 1.8.2, // executing the command for older Gits will fail with exit code 1, which we'll treat as "not ignored" for simplicity GitLineHandler handler = new GitLineHandler(null, root, GitCommand.CHECK_IGNORE); handler.addParameters("--quiet"); // Don't output anything, just set exit status: 0 if ignored handler.addRelativeFiles(Collections.singletonList(checkForIgnore)); return Git.getInstance().runCommand(handler).success(); }