mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: cleanup: remove unused methods
GitOrigin-RevId: 49964a68859d6e7cd66be544a09157c081cb5424
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b93780646a
commit
fb74085e49
@@ -3,7 +3,6 @@ package git4idea.changes;
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.FileStatus;
|
||||
@@ -22,7 +21,6 @@ import git4idea.GitVcs;
|
||||
import git4idea.commands.*;
|
||||
import git4idea.repo.GitRepository;
|
||||
import git4idea.util.StringScanner;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -74,28 +72,6 @@ public class GitChangeUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static Collection<String> parseDiffForPaths(final String rootPath, final StringScanner s) throws VcsException {
|
||||
final Collection<String> result = new ArrayList<>();
|
||||
|
||||
while (s.hasMoreData()) {
|
||||
if (s.isEol()) {
|
||||
s.nextLine();
|
||||
continue;
|
||||
}
|
||||
if ("CADUMR".indexOf(s.peek()) == -1) {
|
||||
// exit if there is no next character
|
||||
break;
|
||||
}
|
||||
assert 'M' != s.peek() : "Moves are not yet handled";
|
||||
String[] tokens = s.line().split("\t");
|
||||
String path = tokens[tokens.length - 1];
|
||||
path = rootPath + File.separator + GitUtil.unescapePath(path);
|
||||
path = FileUtil.toSystemDependentName(path);
|
||||
result.add(path);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse changes from lines
|
||||
*
|
||||
@@ -210,17 +186,6 @@ public class GitChangeUtils {
|
||||
return handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the exception means that HEAD is missing for the current repository.
|
||||
*
|
||||
* @param e the exception to examine
|
||||
* @return true if the head is missing
|
||||
*/
|
||||
public static boolean isHeadMissing(final VcsException e) {
|
||||
@NonNls final String errorText = "fatal: bad revision 'HEAD'\n";
|
||||
return e.getMessage().equals(errorText);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of changes. Because native Git non-linear revision tree structure is not
|
||||
* supported by the current IDEA interfaces some simplifications are made in the case
|
||||
@@ -500,12 +465,6 @@ public class GitChangeUtils {
|
||||
return Git.getInstance().runCommand(handler).getOutputOrThrow();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getDiffOutput(@NotNull Project project, @NotNull VirtualFile root,
|
||||
@NotNull String diffRange, @Nullable Collection<FilePath> dirtyPaths) throws VcsException {
|
||||
return getDiffOutput(project, root, diffRange, dirtyPaths, false, true);
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
private static GitLineHandler getDiffHandler(@NotNull Project project,
|
||||
|
||||
Reference in New Issue
Block a user