Class GitTagDescription

java.lang.Object
com.github.koraktor.mavanagaiata.git.GitTagDescription

public class GitTagDescription extends Object
Represents information about a Git commit like supplied by git describe
Author:
Sebastian Staudt
  • Constructor Details

    • GitTagDescription

      public GitTagDescription(String abbrevCommitId, String nextTagName, int distance)
      Create a new description for the given information
      Parameters:
      abbrevCommitId - The abbreviated commit ID
      nextTagName - The name of the next tag reachable from the commit
      distance - The distance to the next tag
  • Method Details

    • getNextTagName

      public String getNextTagName()
      Returns the name of the next reachable tag
      Returns:
      The name of the next tag
    • isTagged

      public boolean isTagged()
      Returns whether the commit is tagged
      Returns:
      true if the commit is tagged
    • toString

      public String toString()
      Returns the string representation of this description

      This includes the abbreviated commit ID and (if available) the distance to and the name of the next tag.

      Overrides:
      toString in class Object
      Returns:
      The string representation of this description