getting data output right
This commit is contained in:
parent
67d028d6cb
commit
0bf6947060
@ -106,7 +106,7 @@ public class GitRepositoryService {
|
||||
Changes changes = new Changes();
|
||||
String[] strings = output.split("\n");
|
||||
FileChange fileChange = new FileChange();
|
||||
int stringsLength = strings.length;
|
||||
int stringsLength = strings.length - 1;
|
||||
for (int i = 0; i < strings.length; i++) {
|
||||
while (i < stringsLength) {
|
||||
Optional<String> maybeFileName = getFileName(strings[i]);
|
||||
@ -129,13 +129,14 @@ public class GitRepositoryService {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if ((lineChange.getLineTo() != null && lineChange.getLineTo().isEmpty())
|
||||
|| (lineChange.getLineFrom() != null && lineChange.getLineFrom().isEmpty())) {
|
||||
if ((lineChange.getLineTo() != null) || (lineChange.getLineFrom() != null)
|
||||
|| ((lineChange.getLineTo() != null) && (lineChange.getLineFrom() != null))) {
|
||||
fileChange.getLineChanges().add(lineChange);
|
||||
}
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return changes;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user