Browse Source

Merge "Call unlockPack in finally"

stable-5.2
David Pursehouse 6 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
c56afbf18c
  1. 12
      org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

12
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

@ -269,20 +269,26 @@ public class ReceivePack extends BaseReceivePack {
} }
} }
try {
if (unpackError == null) { if (unpackError == null) {
boolean atomic = isCapabilityEnabled(CAPABILITY_ATOMIC); boolean atomic = isCapabilityEnabled(CAPABILITY_ATOMIC);
setAtomic(atomic); setAtomic(atomic);
validateCommands(); validateCommands();
if (atomic && anyRejects()) if (atomic && anyRejects()) {
failPendingCommands(); failPendingCommands();
}
preReceive.onPreReceive(this, filterCommands(Result.NOT_ATTEMPTED)); preReceive.onPreReceive(
if (atomic && anyRejects()) this, filterCommands(Result.NOT_ATTEMPTED));
if (atomic && anyRejects()) {
failPendingCommands(); failPendingCommands();
}
executeCommands(); executeCommands();
} }
} finally {
unlockPack(); unlockPack();
}
if (reportStatus) { if (reportStatus) {
if (echoCommandFailures && msgOut != null) { if (echoCommandFailures && msgOut != null) {

Loading…
Cancel
Save