public class GitTools
extends java.lang.Object
#isOriginReachable(URIish)
, #isValidRepository(URIish)
, #cloneRepository(URIish, File, CredentialsProvider, int)
, ...Constructor | Description |
---|---|
GitTools() |
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
checkOutRef(org.eclipse.jgit.lib.Repository repo,
java.lang.String ref) |
Checks out the given ref branch in the given repository.
|
static org.eclipse.jgit.lib.Repository |
cloneRepository(org.eclipse.jgit.transport.URIish remoteUri,
java.io.File destFolder,
org.eclipse.jgit.transport.RefSpec fetchSpec,
org.eclipse.jgit.transport.CredentialsProvider credentials,
int timeout) |
Clones the given remote repository into the given destination folder.
|
static void |
fetchRepository(org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.transport.RefSpec fetchSpec,
org.eclipse.jgit.transport.CredentialsProvider credentials,
int timeout) |
Fetch deltas from a source-repository
|
public static org.eclipse.jgit.lib.Repository cloneRepository(org.eclipse.jgit.transport.URIish remoteUri, java.io.File destFolder, org.eclipse.jgit.transport.RefSpec fetchSpec, org.eclipse.jgit.transport.CredentialsProvider credentials, int timeout) throws java.io.IOException
remoteUri
- URI of the remote repositorydestFolder
- local destination foldercredentials
- user credentialsjava.io.IOException
- if something went wrongpublic static java.lang.String checkOutRef(org.eclipse.jgit.lib.Repository repo, java.lang.String ref) throws java.io.IOException
targetBranch
- a local or remote branch name.java.io.IOException
- if something went wrongpublic static void fetchRepository(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.transport.RefSpec fetchSpec, org.eclipse.jgit.transport.CredentialsProvider credentials, int timeout) throws java.lang.Exception
java.lang.Exception