Merge "Send only 1 flush pkt at the end of v2 fetch"
This commit is contained in:
commit
0c75097830
|
@ -658,6 +658,10 @@ private ReceivedPackStatistics parsePack(ByteArrayInputStream recvStream, Progre
|
||||||
new StringWriter(), NullOutputStream.INSTANCE);
|
new StringWriter(), NullOutputStream.INSTANCE);
|
||||||
PackParser pp = client.newObjectInserter().newPackParser(sb);
|
PackParser pp = client.newObjectInserter().newPackParser(sb);
|
||||||
pp.parse(NullProgressMonitor.INSTANCE);
|
pp.parse(NullProgressMonitor.INSTANCE);
|
||||||
|
|
||||||
|
// Ensure that there is nothing left in the stream.
|
||||||
|
assertThat(recvStream.read(), is(-1));
|
||||||
|
|
||||||
return pp.getReceivedPackStatistics();
|
return pp.getReceivedPackStatistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1083,8 +1083,12 @@ private void fetchV2() throws IOException {
|
||||||
? db.getRefDatabase().getRefsByPrefix(R_TAGS)
|
? db.getRefDatabase().getRefsByPrefix(R_TAGS)
|
||||||
: null,
|
: null,
|
||||||
unshallowCommits);
|
unshallowCommits);
|
||||||
|
// sendPack invokes pckOut.end() for us, so we do not
|
||||||
|
// need to invoke it here.
|
||||||
|
} else {
|
||||||
|
// Invoke pckOut.end() by ourselves.
|
||||||
|
pckOut.end();
|
||||||
}
|
}
|
||||||
pckOut.end();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue