Class RebaseCommand.RebaseState

  • Enclosing class:
    RebaseCommand

    private static class RebaseCommand.RebaseState
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File dir  
      private java.io.File repoDirectory  
    • Constructor Summary

      Constructors 
      Constructor Description
      RebaseState​(java.io.File repoDirectory)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static void appendToFile​(java.io.File file, java.lang.String content)  
      private static void createFile​(java.io.File parentDir, java.lang.String name, java.lang.String content)  
      void createFile​(java.lang.String name, java.lang.String content)  
      java.io.File getDir()  
      java.io.File getFile​(java.lang.String name)  
      java.lang.String getPath​(java.lang.String name)  
      java.io.File getRewrittenDir()  
      private static java.lang.String readFile​(java.io.File file)  
      private static java.lang.String readFile​(java.io.File directory, java.lang.String fileName)  
      java.lang.String readFile​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

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

      • repoDirectory

        private final java.io.File repoDirectory
      • dir

        private java.io.File dir
    • Constructor Detail

      • RebaseState

        public RebaseState​(java.io.File repoDirectory)
    • Method Detail

      • getDir

        public java.io.File getDir()
      • getRewrittenDir

        public java.io.File getRewrittenDir()
        Returns:
        Directory with rewritten commit hashes, usually exists if RebaseCommand.preserveMerges is true
      • readFile

        public java.lang.String readFile​(java.lang.String name)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • createFile

        public void createFile​(java.lang.String name,
                               java.lang.String content)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getFile

        public java.io.File getFile​(java.lang.String name)
      • getPath

        public java.lang.String getPath​(java.lang.String name)
      • readFile

        private static java.lang.String readFile​(java.io.File file)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readFile

        private static java.lang.String readFile​(java.io.File directory,
                                                 java.lang.String fileName)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • createFile

        private static void createFile​(java.io.File parentDir,
                                       java.lang.String name,
                                       java.lang.String content)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • appendToFile

        private static void appendToFile​(java.io.File file,
                                         java.lang.String content)
                                  throws java.io.IOException
        Throws:
        java.io.IOException