Split the core receive logic out of the SSH code
We need to reuse the basic commit receive logic in both the SSH and the HTTP code in order to support upload over http:// via the new smart HTTP Git protocol. Move the bulk of our Receive logic into the new shared ReceiveCommits class, constructing it on a per-request basis out of the inherited Git repository and project control instance. Change-Id: I43ffd343aac5008c0f9446847e37fcb67d818478 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import com.google.gerrit.server.IdentifiedUser;
|
|||||||
import com.google.gerrit.server.RequestCleanup;
|
import com.google.gerrit.server.RequestCleanup;
|
||||||
import com.google.gerrit.server.account.AccountResolver;
|
import com.google.gerrit.server.account.AccountResolver;
|
||||||
import com.google.gerrit.server.account.GroupControl;
|
import com.google.gerrit.server.account.GroupControl;
|
||||||
|
import com.google.gerrit.server.git.ReceiveCommits;
|
||||||
import com.google.gerrit.server.mail.AddReviewerSender;
|
import com.google.gerrit.server.mail.AddReviewerSender;
|
||||||
import com.google.gerrit.server.mail.CreateChangeSender;
|
import com.google.gerrit.server.mail.CreateChangeSender;
|
||||||
import com.google.gerrit.server.mail.ReplacePatchSetSender;
|
import com.google.gerrit.server.mail.ReplacePatchSetSender;
|
||||||
@@ -43,6 +44,8 @@ public class GerritRequestModule extends FactoryModule {
|
|||||||
bind(GroupControl.Factory.class).in(SINGLETON);
|
bind(GroupControl.Factory.class).in(SINGLETON);
|
||||||
bind(ProjectControl.Factory.class).in(SINGLETON);
|
bind(ProjectControl.Factory.class).in(SINGLETON);
|
||||||
|
|
||||||
|
factory(ReceiveCommits.Factory.class);
|
||||||
|
|
||||||
// Not really per-request, but dammit, I don't know where else to
|
// Not really per-request, but dammit, I don't know where else to
|
||||||
// easily park this stuff.
|
// easily park this stuff.
|
||||||
//
|
//
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user