PackedBatchRefUpdate: Handle the case where loose refs fail to pack
If packing loose refs fails due to a lock failure, reject update with a LOCK_FAILURE. Change-Id: I100e81efd528d963231a1b87bacd9d68f9245a1b Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
This commit is contained in:
parent
2e3f12a0fc
commit
8f8bc703e9
|
@ -168,7 +168,12 @@ public void execute(RevWalk walk, ProgressMonitor monitor,
|
||||||
if (locks == null) {
|
if (locks == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
refdb.pack(locks);
|
try {
|
||||||
|
refdb.pack(locks);
|
||||||
|
} catch (LockFailedException e) {
|
||||||
|
lockFailure(pending.get(0), pending);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LockFile packedRefsLock = refdb.lockPackedRefs();
|
LockFile packedRefsLock = refdb.lockPackedRefs();
|
||||||
|
|
Loading…
Reference in New Issue