Source:
private void service() throws IOException { boolean sendPack; response = new UploadPackResponse(pckOut); try { if (biDirectionalPipe) sendAdvertisedRefs(new PacketLineOutRefAdvertiser(pckOut)); else if (requestValidator instanceof AnyRequestValidator) advertised = Collections.emptySet(); else advertised = refIdSet(getAdvertisedOrDefaultRefs().values()); request = UploadPackRequest.parse(pckIn, biDirectionalPipe); if (request.wantIds.isEmpty()) { preUploadHook.onBeginNegotiateRound(this, request.wantIds, 0); preUploadHook.onEndNegotiateRound( this, request.wantIds, 0, 0, false); return; } if (request.options.contains(OPTION_MULTI_ACK_DETAILED)) { multiAck = MultiAck.DETAILED; noDone = request.options.contains(OPTION_NO_DONE); } else if (request.options.contains(OPTION_MULTI_ACK)) multiAck = MultiAck.CONTINUE; else multiAck = MultiAck.OFF; if (!request.clientShallowCommits.isEmpty()) verifyClientShallow(); if (request.depth != 0) processShallow(); if (!request.clientShallowCommits.isEmpty()) walk.assumeShallow(request.clientShallowCommits); sendPack = negotiate(); } catch (ServiceMayNotContinueException err) { if (!err.isOutput() && err.getMessage() != null) { try { response.writeError(err.getMessage()); err.setOutput(); } catch (Throwable err2) { } } throw err; } catch (IOException | RuntimeException | Error err) { boolean output = false; try { String msg = err instanceof PackProtocolException ? err.getMessage() : JGitText.get().internalServerError; response.writeError(msg); output = true; } catch (Throwable err2) { } if (output) { throw new UploadPackInternalServerErrorException(err); } throw err; } if (sendPack) sendPack(); }

Target:
private void service() throws IOException { boolean sendPack; response = new UploadPackResponse(pckOut); try { if (biDirectionalPipe) sendAdvertisedRefs(new PacketLineOutRefAdvertiser(pckOut)); else if (requestValidator instanceof AnyRequestValidator) advertised = Collections.emptySet(); else advertised = refIdSet(getAdvertisedOrDefaultRefs().values()); request = UploadPackRequest.parseWants(pckIn, biDirectionalPipe); if (request.wantIds.isEmpty()) { preUploadHook.onBeginNegotiateRound(this, request.wantIds, 0); preUploadHook.onEndNegotiateRound( this, request.wantIds, 0, 0, false); return; } if (request.options.contains(OPTION_MULTI_ACK_DETAILED)) { multiAck = MultiAck.DETAILED; noDone = request.options.contains(OPTION_NO_DONE); } else if (request.options.contains(OPTION_MULTI_ACK)) multiAck = MultiAck.CONTINUE; else multiAck = MultiAck.OFF; if (!request.clientShallowCommits.isEmpty()) verifyClientShallow(); if (request.depth != 0) processShallow(); if (!request.clientShallowCommits.isEmpty()) walk.assumeShallow(request.clientShallowCommits); sendPack = negotiate(); } catch (ServiceMayNotContinueException err) { if (!err.isOutput() && err.getMessage() != null) { try { response.writeError(err.getMessage()); err.setOutput(); } catch (Throwable err2) { } } throw err; } catch (IOException | RuntimeException | Error err) { boolean output = false; try { String msg = err instanceof PackProtocolException ? err.getMessage() : JGitText.get().internalServerError; response.writeError(msg); output = true; } catch (Throwable err2) { } if (output) { throw new UploadPackInternalServerErrorException(err); } throw err; } if (sendPack) sendPack(); }