Avoid huge pushes during refs/for/BRANCH push over SSH
Earlier I fixed the huge push problem, but only for smart HTTP. I forgot to apply the same logic to the advertisements offered over SSH, as the SSH variant doesn't require the cache to carry the ObjectIds from one request into the next. Move the logic to the common ReceiveCommits class, and apply it to both the smart HTTP and SSH protocols. Change-Id: I96be6ec4c15d05f7667c9cb3adf221e29a1c3a33 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -86,6 +86,7 @@ final class Receive extends AbstractGitCommand {
|
||||
rp.setRefLogIdent(currentUser.newRefLogIdent());
|
||||
rp.setTimeout(config.getTimeout());
|
||||
try {
|
||||
receive.advertiseHistory();
|
||||
rp.receive(in, out, err);
|
||||
} catch (InterruptedIOException err) {
|
||||
throw new Failure(128, "fatal: client IO read/write timeout", err);
|
||||
|
Reference in New Issue
Block a user