lock.lock();
try {
- Reftable table = refdb.reader();
- if (!checkExpected(table, pending)) {
+ if (!checkExpected(pending)) {
return;
}
if (!checkConflicting(pending)) {
return ok;
}
- private boolean checkExpected(Reftable table, List<ReceiveCommand> pending)
+ private boolean checkExpected(List<ReceiveCommand> pending)
throws IOException {
for (ReceiveCommand cmd : pending) {
- if (!matchOld(cmd, table.exactRef(cmd.getRefName()))) {
+ if (!matchOld(cmd, refdb.exactRef(cmd.getRefName()))) {
cmd.setResult(LOCK_FAILURE);
if (isAtomic()) {
ReceiveCommand.abort(pending);