Source:
private void service() throws IOException { if (isBiDirectionalPipe()) { sendAdvertisedRefs(new PacketLineOutRefAdvertiser(pckOut)); pckOut.flush(); } else getAdvertisedOrDefaultRefs(); if (hasError()) return; recvCommands(); if (hasCommands()) { enableCapabilities(); if (usePushOptions) { readPushOptions(); } Throwable unpackError = null; if (needPack()) { try { receivePackAndCheckConnectivity(); } catch (IOException err) { unpackError = err; } catch (RuntimeException err) { unpackError = err; } catch (Error err) { unpackError = err; } } if (unpackError == null) { boolean atomic = isCapabilityEnabled(CAPABILITY_ATOMIC); setAtomic(atomic); validateCommands(); if (atomic && anyRejects()) failPendingCommands(); preReceive.onPreReceive(this, filterCommands(Result.NOT_ATTEMPTED)); if (atomic && anyRejects()) failPendingCommands(); executeCommands(); } unlockPack(); if (reportStatus) { if (echoCommandFailures && msgOut != null) { sendStatusReport(false, unpackError, new Reporter() { void sendString(final String s) throws IOException { msgOut.write(Constants.encode(s + "\n")); } }); msgOut.flush(); try { Thread.sleep(500); } catch (InterruptedException wakeUp) { } } sendStatusReport(true, unpackError, new Reporter() { void sendString(final String s) throws IOException { pckOut.writeString(s + "\n"); } }); pckOut.end(); } else if (msgOut != null) { sendStatusReport(false, unpackError, new Reporter() { void sendString(final String s) throws IOException { msgOut.write(Constants.encode(s + "\n")); } }); } if (unpackError != null) { try { postReceive.onPostReceive(this, filterCommands(Result.OK)); } catch (Throwable e) { } throw new UnpackException(unpackError); } postReceive.onPostReceive(this, filterCommands(Result.OK)); } }

Target:
private void service() throws IOException { if (isBiDirectionalPipe()) { sendAdvertisedRefs(new PacketLineOutRefAdvertiser(pckOut)); pckOut.flush(); } else getAdvertisedOrDefaultRefs(); if (hasError()) return; recvCommands(); if (hasCommands()) { enableCapabilities(); if (usePushOptions) readPushOptions(); Throwable unpackError = null; if (needPack()) { try { receivePackAndCheckConnectivity(); } catch (IOException err) { unpackError = err; } catch (RuntimeException err) { unpackError = err; } catch (Error err) { unpackError = err; } } if (unpackError == null) { boolean atomic = isCapabilityEnabled(CAPABILITY_ATOMIC); setAtomic(atomic); validateCommands(); if (atomic && anyRejects()) failPendingCommands(); preReceive.onPreReceive(this, filterCommands(Result.NOT_ATTEMPTED)); if (atomic && anyRejects()) failPendingCommands(); executeCommands(); } unlockPack(); if (reportStatus) { if (echoCommandFailures && msgOut != null) { sendStatusReport(false, unpackError, new Reporter() { void sendString(final String s) throws IOException { msgOut.write(Constants.encode(s + "\n")); } }); msgOut.flush(); try { Thread.sleep(500); } catch (InterruptedException wakeUp) { } } sendStatusReport(true, unpackError, new Reporter() { void sendString(final String s) throws IOException { pckOut.writeString(s + "\n"); } }); pckOut.end(); } else if (msgOut != null) { sendStatusReport(false, unpackError, new Reporter() { void sendString(final String s) throws IOException { msgOut.write(Constants.encode(s + "\n")); } }); } if (unpackError != null) { try { postReceive.onPostReceive(this, filterCommands(Result.OK)); } catch (Throwable e) { } throw new UnpackException(unpackError); } postReceive.onPostReceive(this, filterCommands(Result.OK)); } }