Class CliGitBackend

java.lang.Object
io.github.jbastgen.stemma.git.cli.CliGitBackend
All Implemented Interfaces:
io.github.jbastgen.stemma.git.api.GitBackend

public final class CliGitBackend extends Object implements io.github.jbastgen.stemma.git.api.GitBackend
Backend that drives an installed git executable. Unlike the built-in JGit backend it needs a GitInstallation, so it is created by the application (from the user's settings or by GitDiscovery) rather than through ServiceLoader.
  • Field Details

  • Constructor Details

    • CliGitBackend

      public CliGitBackend(GitInstallation installation)
      Throws:
      io.github.jbastgen.stemma.git.api.GitException - if the installation is older than GitVersion.MINIMUM
  • Method Details

    • processesStarted

      public static long processesStarted()
      How many git processes have been started so far (all backends of this kind together).
    • installation

      public GitInstallation installation()
      The installation of git this backend runs.
    • configure

      public void configure(io.github.jbastgen.stemma.git.api.GitOptions options)
      Specified by:
      configure in interface io.github.jbastgen.stemma.git.api.GitBackend
    • id

      public String id()
      Specified by:
      id in interface io.github.jbastgen.stemma.git.api.GitBackend
    • displayName

      public String displayName()
      Specified by:
      displayName in interface io.github.jbastgen.stemma.git.api.GitBackend
    • capabilities

      public Set<io.github.jbastgen.stemma.git.api.Capability> capabilities()
      Specified by:
      capabilities in interface io.github.jbastgen.stemma.git.api.GitBackend
    • isRepository

      public boolean isRepository(Path directory)
      Specified by:
      isRepository in interface io.github.jbastgen.stemma.git.api.GitBackend
    • open

      public io.github.jbastgen.stemma.git.api.GitRepository open(Path directory)
      Specified by:
      open in interface io.github.jbastgen.stemma.git.api.GitBackend
    • init

      public io.github.jbastgen.stemma.git.api.GitRepository init(Path directory, String initialBranch)
      Specified by:
      init in interface io.github.jbastgen.stemma.git.api.GitBackend
    • cloneRepository

      public io.github.jbastgen.stemma.git.api.GitRepository cloneRepository(String url, Path directory)
      Specified by:
      cloneRepository in interface io.github.jbastgen.stemma.git.api.GitBackend