@Override public void lock() { cachedSupplier.get().lock(); }
private void cherryPick(final JGitPathImpl source, final JGitPathImpl target, final String... commits) { try { target.getFileSystem().lock(); source.getFileSystem().getGit().cherryPick(target, commits); } finally { target.getFileSystem().unlock(); } }
private void merge(final JGitPathImpl source, final JGitPathImpl target) { try { target.getFileSystem().lock(); source.getFileSystem().getGit().merge(source.getRefTree(), target.getRefTree()); } finally { target.getFileSystem().unlock(); } }
private void createBranch(final JGitPathImpl source, final JGitPathImpl target) { try { target.getFileSystem().lock(); source.getFileSystem().getGit().createRef(source.getRefTree(), target.getRefTree()); } finally { target.getFileSystem().unlock(); } }
JGitFileSystem fileSystem = (JGitFileSystem) path.getFileSystem(); try { fileSystem.lock();
final Map<String, String> params = getQueryParams(uri); try { fileSystem.lock(); final Pair<String, String> remote = Pair.newPair("upstream", params.get("sync"));
public void deleteBranch(final JGitPathImpl path) { final Ref branch = path.getFileSystem().getGit().getRef(path.getRefTree()); if (branch == null) { throw new NoSuchFileException(path.toString()); } try { path.getFileSystem().lock(); path.getFileSystem().getGit().deleteRef(branch); } finally { path.getFileSystem().unlock(); } }
private void lockAndSquash(final Path path, final SquashOption value) { final JGitFileSystem fileSystem = (JGitFileSystem) path.getFileSystem(); try { fileSystem.lock(); final JGitPathImpl gSource = toPathImpl(path); String commitMessage = checkNotEmpty("commitMessage", value.getMessage()); String startCommit = checkNotEmpty("startCommit", value.getRecord().id()); gSource.getFileSystem().getGit().squash(gSource.getRefTree(), startCommit, commitMessage); } finally { fileSystem.unlock(); } }
squashOption); } catch (Exception e) { fs.lock(); fs.unlock();
squashOption); } catch (Exception e) { fs.lock(); fs.unlock();
fileSystem.lock();