mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: cleanup
This commit is contained in:
committed by
Aleksey Pivovarov
parent
af189a9e39
commit
8bbd6e423d
@@ -657,21 +657,31 @@ public class GitHistoryUtils {
|
||||
|
||||
@Nullable
|
||||
public GitLogRecord acceptLine(String s) {
|
||||
final boolean lineEnd = s.startsWith(GitLogParser.RECORD_START);
|
||||
if (lineEnd && (!myNotStarted)) {
|
||||
final boolean recordStart = s.startsWith(GitLogParser.RECORD_START);
|
||||
if (recordStart) {
|
||||
s = s.substring(GitLogParser.RECORD_START.length());
|
||||
}
|
||||
|
||||
if (myNotStarted) {
|
||||
myBuffer.append(s);
|
||||
myBuffer.append("\n");
|
||||
|
||||
myNotStarted = false;
|
||||
return null;
|
||||
}
|
||||
else if (recordStart) {
|
||||
final String line = myBuffer.toString();
|
||||
myBuffer.setLength(0);
|
||||
myBuffer.append(s.substring(GitLogParser.RECORD_START.length()));
|
||||
|
||||
myBuffer.append(s);
|
||||
|
||||
return processResult(line);
|
||||
}
|
||||
else {
|
||||
myBuffer.append(lineEnd ? s.substring(GitLogParser.RECORD_START.length()) : s);
|
||||
myBuffer.append(s);
|
||||
myBuffer.append("\n");
|
||||
return null;
|
||||
}
|
||||
myNotStarted = false;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public GitLogRecord processLast() {
|
||||
|
||||
Reference in New Issue
Block a user