Class GitUtil


  • public final class GitUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NO_COMMIT  
    • Constructor Summary

      Constructors 
      Constructor Description
      GitUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String branch​(org.eclipse.jgit.lib.Repository repository)  
      static GitDescription describe​(org.eclipse.jgit.lib.ObjectId revObjectId, java.util.regex.Pattern tagPattern, org.eclipse.jgit.lib.Repository repository, boolean firstParent)  
      static boolean isShallowRepository​(org.eclipse.jgit.lib.Repository repository)  
      static java.util.Map<org.eclipse.jgit.lib.ObjectId,​java.util.List<java.lang.String>> reverseTagRefMap​(org.eclipse.jgit.lib.Repository repository)  
      static java.time.ZonedDateTime revTimestamp​(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.lib.ObjectId rev)  
      static org.eclipse.jgit.api.Status status​(org.eclipse.jgit.lib.Repository repository)  
      static java.util.List<org.eclipse.jgit.lib.Ref> tags​(org.eclipse.jgit.lib.Repository repository)  
      static java.util.List<java.lang.String> tagsPointAt​(org.eclipse.jgit.lib.ObjectId revObjectId, org.eclipse.jgit.lib.Repository repository)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NO_COMMIT

        public static java.lang.String NO_COMMIT
    • Constructor Detail

      • GitUtil

        public GitUtil()
    • Method Detail

      • status

        public static org.eclipse.jgit.api.Status status​(org.eclipse.jgit.lib.Repository repository)
                                                  throws org.eclipse.jgit.api.errors.GitAPIException
        Throws:
        org.eclipse.jgit.api.errors.GitAPIException
      • branch

        public static java.lang.String branch​(org.eclipse.jgit.lib.Repository repository)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • tagsPointAt

        public static java.util.List<java.lang.String> tagsPointAt​(org.eclipse.jgit.lib.ObjectId revObjectId,
                                                                   org.eclipse.jgit.lib.Repository repository)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • describe

        public static GitDescription describe​(org.eclipse.jgit.lib.ObjectId revObjectId,
                                              java.util.regex.Pattern tagPattern,
                                              org.eclipse.jgit.lib.Repository repository,
                                              boolean firstParent)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • isShallowRepository

        public static boolean isShallowRepository​(org.eclipse.jgit.lib.Repository repository)
      • tags

        public static java.util.List<org.eclipse.jgit.lib.Ref> tags​(org.eclipse.jgit.lib.Repository repository)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • reverseTagRefMap

        public static java.util.Map<org.eclipse.jgit.lib.ObjectId,​java.util.List<java.lang.String>> reverseTagRefMap​(org.eclipse.jgit.lib.Repository repository)
                                                                                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • revTimestamp

        public static java.time.ZonedDateTime revTimestamp​(org.eclipse.jgit.lib.Repository repository,
                                                           org.eclipse.jgit.lib.ObjectId rev)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException