lck.setFSync(true);
lck.setNeedStatInformation(true);
try {
lck.write(content);
} catch (IOException ioe) {
throw new ObjectWritingException(MessageFormat.format(JGitText.get().unableToWrite, name), ioe);
}
try {
lck.waitForStatChange();
} catch (InterruptedException e) {
lck.unlock();
throw new ObjectWritingException(MessageFormat.format(JGitText.get().interruptedWriting, name));
}
if (!lck.commit())
throw new ObjectWritingException(MessageFormat.format(JGitText.get().unableToWrite, name));
packedRefs.compareAndSet(oldPackedList, new PackedRefList(refs,
content.length, lck.getCommitLastModified()));
}
}.writePackedRefs();