Class GitRepository

java.lang.Object
io.github.joke.conventionalversion.git.GitRepository

public class GitRepository extends Object
The repository reads the calculation needs, each one git command.
  • Constructor Details

  • Method Details

    • verifyUsable

      public void verifyUsable()
    • isInsideWorkTree

      @VisibleForTesting protected boolean isInsideWorkTree()
    • isShallow

      @VisibleForTesting protected boolean isShallow()
    • repositoryRoot

      public String repositoryRoot()
      The root of the working tree, which is where release-please keeps its configuration.
    • headSha

      public String headSha()
    • findTaggedCommit

      public Optional<String> findTaggedCommit(String tag)
      The commit a tag points at, or empty when no such tag exists.
    • allCommits

      public List<Commit> allCommits()
      Every commit reachable from HEAD, oldest first, with their paths.

      The whole first-parent history rather than a range, because each package's range starts at its own base commit and the ranges are sliced from this one read. Asking git per package would scale the number of processes with the number of packages.

    • withRange

      @VisibleForTesting protected List<String> withRange(String range)
    • logCommits

      @VisibleForTesting protected List<Commit> logCommits(List<String> arguments)
    • parseCommits

      @VisibleForTesting protected List<Commit> parseCommits(String output)
    • parseCommit

      @VisibleForTesting protected Commit parseCommit(String entry)
    • parsePaths

      @VisibleForTesting protected List<String> parsePaths(String text)