Resolve "Исправить ошибку" #52
@ -301,32 +301,4 @@ public class GitRepositoryService {
|
|||||||
}
|
}
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Optional<String> getLineTo(String commitString) {
|
|
||||||
String startString = "+";
|
|
||||||
String startPlus = "+++";
|
|
||||||
if (commitString.startsWith(startString)) {
|
|
||||||
String lineTo = commitString.substring(commitString.indexOf(startString) + startString.length());
|
|
||||||
if (commitString.startsWith(startPlus)) {
|
|
||||||
return Optional.empty();
|
|
||||||
} else {
|
|
||||||
return Optional.of(lineTo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Optional<String> getLineFrom(String commitString) {
|
|
||||||
String startString = "-";
|
|
||||||
String startMinus = "---";
|
|
||||||
if (commitString.startsWith(startString)) {
|
|
||||||
String lineFrom = commitString.substring(commitString.indexOf(startString) + startString.length());
|
|
||||||
if (commitString.startsWith(startMinus)) {
|
|
||||||
return Optional.empty();
|
|
||||||
} else {
|
|
||||||
return Optional.of(lineFrom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user