From b4e9ebc406c7f40cc47aace1a776c44f01450104 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Wed, 18 Feb 2015 21:51:53 +0000 Subject: [PATCH] IDEA-116852 Enabled Git 'Compare with branch' popup to allow filtering/searching via branch name --- .../src/git4idea/actions/GitCompareWithBranchAction.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/git4idea/src/git4idea/actions/GitCompareWithBranchAction.java b/plugins/git4idea/src/git4idea/actions/GitCompareWithBranchAction.java index 9d22582f8e2a..3e455f98a53f 100644 --- a/plugins/git4idea/src/git4idea/actions/GitCompareWithBranchAction.java +++ b/plugins/git4idea/src/git4idea/actions/GitCompareWithBranchAction.java @@ -30,6 +30,7 @@ import com.intellij.openapi.vcs.history.CurrentRevision; import com.intellij.openapi.vcs.history.VcsFileRevision; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.components.JBList; +import com.intellij.util.Function; import com.intellij.util.containers.ContainerUtil; import git4idea.GitBranch; import git4idea.GitFileRevision; @@ -84,6 +85,12 @@ public class GitCompareWithBranchAction extends DumbAwareAction { .setTitle("Select branch to compare") .setItemChoosenCallback(new OnBranchChooseRunnable(project, file, head, list)) .setAutoselectOnMouseMove(true) + .setFilteringEnabled(new Function() { + @Override + public String fun(Object o) { + return o.toString(); + } + }) .createPopup() .showInBestPositionFor(event.getDataContext()); }