boolean (@NotNull LogEntry entry, @NotNull String localURL, @NotNull String relativeBranch) { boolean atLeastOneUnderBranch = false; for (LogEntryPath path : entry.getChangedPaths().values()) { if (Url.isAncestor(localURL, path.getPath())) { return true; } if (!atLeastOneUnderBranch && Url.isAncestor(relativeBranch, path.getPath())) { atLeastOneUnderBranch = true; } } return !atLeastOneUnderBranch; }