org.kie.commons.java.nio.fs.jgit.util
Class JGitUtil
java.lang.Object
org.kie.commons.java.nio.fs.jgit.util.JGitUtil
public final class JGitUtil
- extends Object
|
Method Summary |
static List<org.eclipse.jgit.lib.Ref> |
branchList(org.eclipse.jgit.api.Git git)
|
static List<org.eclipse.jgit.lib.Ref> |
branchList(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.api.ListBranchCommand.ListMode listMode)
|
static VersionAttributes |
buildVersionAttributes(JGitFileSystem fs,
String branchName,
String path)
|
static Pair<JGitUtil.PathType,org.eclipse.jgit.lib.ObjectId> |
checkPath(org.eclipse.jgit.api.Git git,
String branchName,
String path)
|
static org.eclipse.jgit.api.Git |
cloneRepository(File repoFolder,
String fromURI,
boolean bare,
org.eclipse.jgit.transport.CredentialsProvider credentialsProvider)
|
static void |
commit(org.eclipse.jgit.api.Git git,
String branchName,
String name,
String email,
String message,
TimeZone timeZone,
Date when,
Map<String,File> content)
|
static void |
createBranch(org.eclipse.jgit.api.Git git,
String source,
String target)
|
static void |
delete(org.eclipse.jgit.api.Git git,
String branchName,
String path,
String name,
String email,
String message,
TimeZone timeZone,
Date when)
|
static void |
deleteBranch(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.lib.Ref branch)
|
static void |
fetchRepository(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.transport.CredentialsProvider credentialsProvider,
org.eclipse.jgit.transport.RefSpec... refSpecs)
|
static org.eclipse.jgit.lib.Ref |
getBranch(org.eclipse.jgit.api.Git git,
String name)
|
static List<org.eclipse.jgit.diff.DiffEntry> |
getDiff(org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.lib.ObjectId oldRef,
org.eclipse.jgit.lib.ObjectId newRef)
|
static org.eclipse.jgit.lib.ObjectId |
getTreeRefObjectId(org.eclipse.jgit.lib.Repository repo,
String treeRef)
|
static boolean |
hasBranch(org.eclipse.jgit.api.Git git,
String branchName)
|
static List<JGitUtil.JGitPathInfo> |
listPathContent(org.eclipse.jgit.api.Git git,
String branchName,
String path)
|
static org.eclipse.jgit.api.MergeResult |
mergeBranches(org.eclipse.jgit.api.Git git,
String source,
String target)
|
static org.eclipse.jgit.api.Git |
newRepository(File repoFolder,
boolean bare)
|
static InputStream |
resolveInputStream(org.eclipse.jgit.api.Git git,
String treeRef,
String path)
|
static org.eclipse.jgit.lib.ObjectId |
resolveObjectId(org.eclipse.jgit.api.Git git,
String name)
|
static JGitUtil.JGitPathInfo |
resolvePath(org.eclipse.jgit.api.Git git,
String branchName,
String path)
|
static void |
syncRepository(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.transport.CredentialsProvider credentialsProvider,
String origin,
boolean force)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newRepository
public static org.eclipse.jgit.api.Git newRepository(File repoFolder,
boolean bare)
throws IOException
- Throws:
IOException
branchList
public static List<org.eclipse.jgit.lib.Ref> branchList(org.eclipse.jgit.api.Git git)
branchList
public static List<org.eclipse.jgit.lib.Ref> branchList(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.api.ListBranchCommand.ListMode listMode)
resolveInputStream
public static InputStream resolveInputStream(org.eclipse.jgit.api.Git git,
String treeRef,
String path)
cloneRepository
public static org.eclipse.jgit.api.Git cloneRepository(File repoFolder,
String fromURI,
boolean bare,
org.eclipse.jgit.transport.CredentialsProvider credentialsProvider)
fetchRepository
public static void fetchRepository(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.transport.CredentialsProvider credentialsProvider,
org.eclipse.jgit.transport.RefSpec... refSpecs)
throws org.eclipse.jgit.api.errors.InvalidRemoteException
- Throws:
org.eclipse.jgit.api.errors.InvalidRemoteException
syncRepository
public static void syncRepository(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.transport.CredentialsProvider credentialsProvider,
String origin,
boolean force)
throws org.eclipse.jgit.api.errors.InvalidRemoteException
- Throws:
org.eclipse.jgit.api.errors.InvalidRemoteException
delete
public static void delete(org.eclipse.jgit.api.Git git,
String branchName,
String path,
String name,
String email,
String message,
TimeZone timeZone,
Date when)
getTreeRefObjectId
public static org.eclipse.jgit.lib.ObjectId getTreeRefObjectId(org.eclipse.jgit.lib.Repository repo,
String treeRef)
getDiff
public static List<org.eclipse.jgit.diff.DiffEntry> getDiff(org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.lib.ObjectId oldRef,
org.eclipse.jgit.lib.ObjectId newRef)
commit
public static void commit(org.eclipse.jgit.api.Git git,
String branchName,
String name,
String email,
String message,
TimeZone timeZone,
Date when,
Map<String,File> content)
resolveObjectId
public static org.eclipse.jgit.lib.ObjectId resolveObjectId(org.eclipse.jgit.api.Git git,
String name)
getBranch
public static org.eclipse.jgit.lib.Ref getBranch(org.eclipse.jgit.api.Git git,
String name)
deleteBranch
public static void deleteBranch(org.eclipse.jgit.api.Git git,
org.eclipse.jgit.lib.Ref branch)
buildVersionAttributes
public static VersionAttributes buildVersionAttributes(JGitFileSystem fs,
String branchName,
String path)
createBranch
public static void createBranch(org.eclipse.jgit.api.Git git,
String source,
String target)
hasBranch
public static boolean hasBranch(org.eclipse.jgit.api.Git git,
String branchName)
checkPath
public static Pair<JGitUtil.PathType,org.eclipse.jgit.lib.ObjectId> checkPath(org.eclipse.jgit.api.Git git,
String branchName,
String path)
resolvePath
public static JGitUtil.JGitPathInfo resolvePath(org.eclipse.jgit.api.Git git,
String branchName,
String path)
listPathContent
public static List<JGitUtil.JGitPathInfo> listPathContent(org.eclipse.jgit.api.Git git,
String branchName,
String path)
mergeBranches
public static org.eclipse.jgit.api.MergeResult mergeBranches(org.eclipse.jgit.api.Git git,
String source,
String target)
throws Exception
- Throws:
Exception
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.