Merge branch 'stable-4.5'
* origin/stable-4.5: Fix one case of missing object Change-Id: Ia6384f4be71086d5a0a8c42c7521220f57dfd086 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
commit
5274da3c3c
|
@ -459,9 +459,14 @@ public void prune(Set<ObjectId> objectsToKeep) throws IOException,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// delete all candidates which have survived: these are unreferenced
|
// delete all candidates which have survived: these are unreferenced
|
||||||
// loose objects
|
// loose objects. Make a last check, though, to avoid deleting objects
|
||||||
for (File f : deletionCandidates.values())
|
// that could have been referenced while the candidates list was being
|
||||||
|
// built (by an incoming push, for example).
|
||||||
|
for (File f : deletionCandidates.values()) {
|
||||||
|
if (f.lastModified() < expireDate) {
|
||||||
f.delete();
|
f.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
repo.getObjectDatabase().close();
|
repo.getObjectDatabase().close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue