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()
    • headSha

      public String headSha()
    • findTaggedCommit

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

      public List<String> commitMessagesSince(String sinceCommit)
      Messages of the commits reachable from HEAD but not from sinceCommit, oldest first.

      --first-parent is a no-op on the linear history this targets and is the correct reading on a repository that uses merge commits, so it is never worse than the alternative.

    • allCommitMessages

      public List<String> allCommitMessages()
      Messages of every commit reachable from HEAD, oldest first.
    • logMessages

      @VisibleForTesting protected List<String> logMessages(List<String> arguments)
    • splitRecords

      @VisibleForTesting protected List<String> splitRecords(String output)