}
private static void receivePack(final InputStream input, Repository repository,
final OutputStream output,
final PostReceiveHook postReceiveHook) {
final ReceivePack receivePack = new ReceivePack(repository);
receivePack.setBiDirectionalPipe(false);
new Thread() {
@Override
public void run() {
try {
receivePack.setPostReceiveHook(postReceiveHook);
receivePack.receive(input, output, null);
} catch (IOException e) {
Logger.error("receivePack failed", e);
}
closeStreams("receivePack", input, output);