Class SubdirectoryClone


  • public class SubdirectoryClone
    extends Object
    Copies a single subdirectory of a repository, preserving all relevant history.
    • Constructor Detail

      • SubdirectoryClone

        public SubdirectoryClone​(File directory,
                                 String origin,
                                 String subdirectory,
                                 List<String> branches,
                                 org.eclipse.jgit.transport.CredentialsProvider credentialsProvider,
                                 org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                                 File hookDir)
        Parameters:
        directory - Directory for the local target repository (created by this command). Must not be null.
        origin - URI for the repository being cloned. Must not be null.
        subdirectory - The subdirectory within the origin being copied. Must not be null.
        branches - The branches that should be copied. Must not be null.
        credentialsProvider - Provides credentials for the initial cloning of the origin. May be null.
        leaders - Used for initial cloning. May be null.
        hookDir - Used to specify the directory containing the Git Hooks to add to the repository. May be null.
      • SubdirectoryClone

        public SubdirectoryClone​(File directory,
                                 String origin,
                                 String subdirectory,
                                 List<String> branches,
                                 org.eclipse.jgit.transport.CredentialsProvider credentialsProvider,
                                 org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                                 File hookDir,
                                 boolean sslVerify)
        Parameters:
        directory - Directory for the local target repository (created by this command). Must not be null.
        origin - URI for the repository being cloned. Must not be null.
        subdirectory - The subdirectory within the origin being copied. Must not be null.
        branches - The branches that should be copied. Must not be null.
        credentialsProvider - Provides credentials for the initial cloning of the origin. May be null.
        leaders - Used for initial cloning. May be null.
        hookDir - Used to specify the directory containing the Git Hooks to add to the repository. May be null.
        sslVerify - Used to disable http ssl verify on the repository
    • Method Detail

      • execute

        public Git execute()