Remove useless for(;;) loop
Change-Id: Ic9a7824cc178e92f44126acc8e77b0304b20ef4f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
This commit is contained in:
parent
7d3040368f
commit
e00f59b7fe
|
@ -93,27 +93,25 @@ int outputType() {
|
|||
@Override
|
||||
RevCommit next() throws MissingObjectException,
|
||||
IncorrectObjectTypeException, IOException {
|
||||
for (;;) {
|
||||
final RevCommit c = source.next();
|
||||
if (c == null)
|
||||
return null;
|
||||
|
||||
boolean rewrote = false;
|
||||
final RevCommit[] pList = c.parents;
|
||||
final int nParents = pList.length;
|
||||
for (int i = 0; i < nParents; i++) {
|
||||
final RevCommit oldp = pList[i];
|
||||
final RevCommit newp = rewrite(oldp);
|
||||
if (oldp != newp) {
|
||||
pList[i] = newp;
|
||||
rewrote = true;
|
||||
}
|
||||
}
|
||||
if (rewrote)
|
||||
c.parents = cleanup(pList);
|
||||
|
||||
return c;
|
||||
final RevCommit c = source.next();
|
||||
if (c == null) {
|
||||
return null;
|
||||
}
|
||||
boolean rewrote = false;
|
||||
final RevCommit[] pList = c.parents;
|
||||
final int nParents = pList.length;
|
||||
for (int i = 0; i < nParents; i++) {
|
||||
final RevCommit oldp = pList[i];
|
||||
final RevCommit newp = rewrite(oldp);
|
||||
if (oldp != newp) {
|
||||
pList[i] = newp;
|
||||
rewrote = true;
|
||||
}
|
||||
}
|
||||
if (rewrote) {
|
||||
c.parents = cleanup(pList);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
private RevCommit rewrite(RevCommit p) {
|
||||
|
|
Loading…
Reference in New Issue