deadcode
authorKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Tue, 31 Jan 2012 13:29:00 +0000 (17:29 +0400)
committerKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Wed, 1 Feb 2012 14:01:19 +0000 (18:01 +0400)
plugins/git4idea/src/git4idea/push/GitPushSpec.java

index 7704ae94de954f232c4a45898cd17d6659a8b69e..634361ddca1c73fecccc68c0ac9eb06922032360 100644 (file)
  */
 package git4idea.push;
 
  */
 package git4idea.push;
 
-import com.intellij.openapi.util.Pair;
-import com.intellij.openapi.vcs.VcsException;
 import git4idea.GitBranch;
 import git4idea.GitBranch;
-import git4idea.GitUtil;
-import git4idea.branch.GitBranchPair;
 import git4idea.repo.GitRemote;
 import git4idea.repo.GitRemote;
-import git4idea.repo.GitRepository;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
 
 /**
  * @author Kirill Likhodedov
 
 /**
  * @author Kirill Likhodedov
@@ -55,23 +49,6 @@ public class GitPushSpec {
     return myDest;
   }
 
     return myDest;
   }
 
-  @Nullable
-  private static GitBranchPair findSourceDestForBranch(GitRepository repository, GitBranch branch) throws VcsException {
-    GitBranch trackedBranch = branch.tracked(repository.getProject(), repository.getRoot());
-    if (trackedBranch != null) {
-      return new GitBranchPair(branch, trackedBranch);
-    }
-    Pair<GitRemote,GitBranch> remoteAndBranch = GitUtil.findMatchingRemoteBranch(repository, branch);
-    if (remoteAndBranch == null) {
-      return null;
-    }
-    GitBranch matchingRemoteBranch = remoteAndBranch.getSecond();
-    if (matchingRemoteBranch != null) {
-      return new GitBranchPair(branch, matchingRemoteBranch);
-    }
-    return null;
-  }
-
   @Override
   public String toString() {
     return myRemote + " " + mySource + "->" + myDest;
   @Override
   public String toString() {
     return myRemote + " " + mySource + "->" + myDest;