mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[git] extract method for --no-walk parameter
This commit is contained in:
@@ -614,8 +614,7 @@ public class GitHistoryUtils {
|
||||
public static String[] formHashParameters(@NotNull GitVcs vcs, @NotNull Collection<String> hashes) {
|
||||
List<String> parameters = ContainerUtil.newArrayList();
|
||||
|
||||
String noWalk = GitVersionSpecialty.NO_WALK_UNSORTED.existsIn(vcs.getVersion()) ? "--no-walk=unsorted" : "--no-walk";
|
||||
parameters.add(noWalk);
|
||||
parameters.add(GitLogUtil.getNoWalkParameter(vcs));
|
||||
parameters.addAll(hashes);
|
||||
|
||||
return ArrayUtil.toStringArray(parameters);
|
||||
|
||||
@@ -372,8 +372,7 @@ public class GitLogUtil {
|
||||
return false;
|
||||
});
|
||||
|
||||
readRecordsFromHandler(project, root, false, true, recordCollector, handler,
|
||||
GitVersionSpecialty.NO_WALK_UNSORTED.existsIn(vcs.getVersion()) ? "--no-walk=unsorted" : "--no-walk", "--stdin");
|
||||
readRecordsFromHandler(project, root, false, true, recordCollector, handler, getNoWalkParameter(vcs), "--stdin");
|
||||
recordCollector.finish();
|
||||
|
||||
if (!inputError.isNull()) {
|
||||
@@ -381,6 +380,11 @@ public class GitLogUtil {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getNoWalkParameter(@NotNull GitVcs vcs) {
|
||||
return GitVersionSpecialty.NO_WALK_UNSORTED.existsIn(vcs.getVersion()) ? "--no-walk=unsorted" : "--no-walk";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static List<String> createConfigParameters(boolean withChanges) {
|
||||
return Registry.is("git.diff.renameLimit.infinity") && withChanges ?
|
||||
|
||||
Reference in New Issue
Block a user