Class GitTagDescription


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

      • GitTagDescription

        public GitTagDescription​(String abbrevCommitId,
                                 GitTag nextTag,
                                 int distance)
        Create a new description for the given information
        Parameters:
        abbrevCommitId - The abbreviated commit ID
        nextTag - The next tag reachable from the commit
        distance - The distance to the next tag
    • Method Detail

      • 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