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