Interface GitMetadata

All Known Implementing Classes:
GitMetadataImpl

public interface GitMetadata
Git Metadata interface to allow easy test stubbing with records.
  • Method Details

    • uniqueShort

      @Nullable String uniqueShort()
      Short version of a commit SHA.
      Returns:
      SHA. Length starts at 8 but may grow as repository does
    • tag

      @Nullable String tag()
      Gets latest tag.
      Returns:
      the latest tag
    • distance

      long distance()
      Gets commit distance.
      Returns:
      the commit distance
    • status

      GitStatus status()
      Gets status.
      Returns:
      the status
    • branch

      @Nullable String branch()
      Gets the current branch.
      Returns:
      the current branch
    • commit

      @Nullable String commit()
      Gets the current commit.
      Returns:
      the current commit
    • remotes

      List<GitRemote> remotes()
      Gets the remotes.
      Returns:
      the configured remotes or an empty list