/** * Loads the repository _if_ inside a geogig repository and returns a configured {@link GeoGIG} * facade. * * @return a geogig for the current repository or {@code null} if not inside a geogig repository * directory. */ @Nullable private GeoGIG loadRepository() { return loadRepository(this.hints); }
/** * Loads the repository _if_ inside a geogig repository and returns a configured {@link GeoGIG} * facade. * * @return a geogig for the current repository or {@code null} if not inside a geogig repository * directory. */ @Nullable private GeoGIG loadRepository() { return loadRepository(this.hints); }
/** * Loads the repository _if_ inside a geogig repository and returns a configured {@link GeoGIG} * facade. * * @return a geogig for the current repository or {@code null} if not inside a geogig repository * directory. */ @Nullable private GeoGIG loadRepository() { return loadRepository(this.hints); }
@VisibleForTesting public synchronized GeoGIG getGeogig(Hints hints) { close(); GeoGIG geogig = loadRepository(hints); setGeogig(geogig); return geogig; }
/** * Provides a GeoGIG facade configured for the current repository if inside a repository, * {@code null} otherwise. * <p> * Note the repository is lazily loaded and cached afterwards to simplify the execution of * commands or command options that do not need a live repository. * * @return the GeoGIG facade associated with the current repository, or {@code null} if there's * no repository in the current {@link Platform#pwd() working directory} * @see ResolveGeogigURI */ @Nullable public synchronized GeoGIG getGeogig() { if (providedGeogig != null) { return providedGeogig; } if (geogig == null) { GeoGIG geogig = loadRepository(); setGeogig(geogig); } return geogig; }
/** * Provides a GeoGIG facade configured for the current repository if inside a repository, * {@code null} otherwise. * <p> * Note the repository is lazily loaded and cached afterwards to simplify the execution of * commands or command options that do not need a live repository. * * @return the GeoGIG facade associated with the current repository, or {@code null} if there's * no repository in the current {@link Platform#pwd() working directory} * @see ResolveGeogigURI */ @Nullable public synchronized GeoGIG getGeogig() { if (providedGeogig != null) { return providedGeogig; } if (geogig == null) { GeoGIG geogig = loadRepository(); setGeogig(geogig); } return geogig; }
/** * Provides a GeoGIG facade configured for the current repository if inside a repository, * {@code null} otherwise. * <p> * Note the repository is lazily loaded and cached afterwards to simplify the execution of * commands or command options that do not need a live repository. * * @return the GeoGIG facade associated with the current repository, or {@code null} if there's * no repository in the current {@link Platform#pwd() working directory} * @see ResolveGeogigURI */ @Nullable public synchronized GeoGIG getGeogig() { if (providedGeogig != null) { return providedGeogig; } if (geogig == null) { GeoGIG geogig = loadRepository(); setGeogig(geogig); } return geogig; }
@VisibleForTesting public synchronized GeoGIG getGeogig(Hints hints) { close(); GeoGIG geogig = loadRepository(hints); setGeogig(geogig); return geogig; }
@VisibleForTesting public synchronized GeoGIG getGeogig(Hints hints) { close(); GeoGIG geogig = loadRepository(hints); setGeogig(geogig); return geogig; }