Class FileHeaderUtil


  • public class FileHeaderUtil
    extends Object
    A utility class for the FileHeader JGit object
    • Constructor Detail

      • FileHeaderUtil

        public FileHeaderUtil()
    • Method Detail

      • getHeaderLines

        public static com.google.common.collect.ImmutableList<String> getHeaderLines​(org.eclipse.jgit.patch.FileHeader fileHeader)
        Splits the FileHeader string to a list of strings, one string per header line.
      • getHeaderLines

        public static com.google.common.collect.ImmutableList<String> getHeaderLines​(String header)
      • getNewPath

        public static Optional<String> getNewPath​(org.eclipse.jgit.patch.FileHeader header)
        Returns the new file path associated with the FileHeader, or empty if the file is Patch.ChangeType.DELETED.
      • getChangeType

        public static Patch.ChangeType getChangeType​(org.eclipse.jgit.patch.FileHeader header)
        Returns the change type associated with the file header.
      • getPatchType

        public static Patch.PatchType getPatchType​(org.eclipse.jgit.patch.FileHeader header)