Source:
public Daemon(final InetSocketAddress addr) { myAddress = addr; processors = new ThreadGroup("Git-Daemon"); repositoryResolver = (RepositoryResolver<DaemonClient>) RepositoryResolver.NONE; uploadPackFactory = new UploadPackFactory<DaemonClient>() { @Override public UploadPack create(DaemonClient req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = new UploadPack(db); up.setTimeout(getTimeout()); up.setPackConfig(getPackConfig()); return up; } }; receivePackFactory = new ReceivePackFactory<DaemonClient>() { @Override public ReceivePack create(DaemonClient req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = new ReceivePack(db); InetAddress peer = req.getRemoteAddress(); String host = peer.getCanonicalHostName(); if (host == null) host = peer.getHostAddress(); String name = "anonymous"; String email = name + "@" + host; rp.setRefLogIdent(new PersonIdent(name, email)); rp.setTimeout(getTimeout()); return rp; } }; services = new DaemonService[] { new DaemonService("upload-pack", "uploadpack") { { setEnabled(true); } @Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = uploadPackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); if (db.getConfig().getInt("protocol", "version", 0) >= 2) { up.setUseProtocolV2(getUseProtocolV2()); } up.upload(in, out, null); } }, new DaemonService("receive-pack", "receivepack") { { setEnabled(false); } @Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = receivePackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); rp.receive(in, out, null); } } }; }

Target:
public Daemon(final InetSocketAddress addr) { myAddress = addr; processors = new ThreadGroup("Git-Daemon"); repositoryResolver = (RepositoryResolver<DaemonClient>) RepositoryResolver.NONE; uploadPackFactory = new UploadPackFactory<DaemonClient>() { @Override public UploadPack create(DaemonClient req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = new UploadPack(db); up.setTimeout(getTimeout()); up.setPackConfig(getPackConfig()); return up; } }; receivePackFactory = new ReceivePackFactory<DaemonClient>() { @Override public ReceivePack create(DaemonClient req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = new ReceivePack(db); InetAddress peer = req.getRemoteAddress(); String host = peer.getCanonicalHostName(); if (host == null) host = peer.getHostAddress(); String name = "anonymous"; String email = name + "@" + host; rp.setRefLogIdent(new PersonIdent(name, email)); rp.setTimeout(getTimeout()); return rp; } }; services = new DaemonService[] { new DaemonService("upload-pack", "uploadpack") { { setEnabled(true); } @Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = uploadPackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); if (db.getConfig().getInt("protocol", "version", 0) == 2) { up.setUseProtocolV2(getProtocolV2Requested()); } up.upload(in, out, null); } }, new DaemonService("receive-pack", "receivepack") { { setEnabled(false); } @Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = receivePackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); rp.receive(in, out, null); } } }; }