SuccessChanges

Summary

  1. Avoid opening the repo to check for the ansi.enabled config option (details)
  2. Avoid opening the repo just to unalias a CLI command (details)
Commit 66c1107a5f9e390ab020cf1658c310701ebfa48e by groldan
Avoid opening the repo to check for the ansi.enabled config option
ansi.enabled shall be a global config option. Before this patch, CLI was
opening the repo in read-write mode just to get to fetch that config
setting, also making read-only commands fail on repositories with the
rocksdb backend that were open by another process.
This patch resolves the repository URI, if given as an argument or
resolvable from the current working directory, and then uses
RepositoryResolver.resolveConfigDatabase(...) to get the (possibly
global only) config database instead, avoiding the attempt to open all
the repository's databases in read-write mode and then closing it, just
to be re-opened later to actually execute the command.
Signed-off-by: Gabriel Roldan <groldan@boundlessgeo.com>
The file was modifiedsrc/cli-app/src/main/java/org/locationtech/geogig/cli/app/CLI.java (diff)
Commit 3b4cd35a836f5ff3f3065abf97c55a124c429f06 by groldan
Avoid opening the repo just to unalias a CLI command
In case a CLI command can't be found, a check is performed by GeogigCLI
to verify if the command name is an alias in the config database. To do
so, it was opening the repository and closing it (meaning connecting to
all it's databases), to then opening and closing it again to actually
execute the command.
This patch opens only the ConfigDatabase to check for the alias.
Signed-off-by: Gabriel Roldan <groldan@boundlessgeo.com>
The file was modifiedsrc/cli/src/main/java/org/locationtech/geogig/cli/GeogigCLI.java (diff)