Interface Git
-
- All Known Implementing Classes:
GitImpl
public interface Git
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRemote(String remote, String url)InputStreamblobAsInputStream(String treeRef, String path)voidcherryPick(String targetBranch, String... commitsIDs)voidcherryPick(JGitPathImpl target, String... commits)static Gitclone(File repoDest, String origin, boolean isMirror, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir)static Gitclone(File repoDest, String origin, boolean isMirror, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir, boolean sslVerify)static GitcloneSubdirectory(File repoDest, String origin, String subdirectory, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir)static GitcloneSubdirectory(File repoDest, String origin, String subdirectory, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir, boolean sslVerify)booleancommit(String branchName, CommitInfo commitInfo, boolean amend, org.eclipse.jgit.lib.ObjectId originId, CommitContent content)List<String>conflictBranchesChecker(String branchA, String branchB)voidconvertRefTree()voidcreateRef(String source, String target)static GitcreateRepository(File repoDir)static GitcreateRepository(File repoDir, boolean sslVerify)static GitcreateRepository(File repoDir, File hookDir)static GitcreateRepository(File repoDir, File hookDir, boolean sslVerify)static GitcreateRepository(File repoDir, File hookDir, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders)static GitcreateRepository(File repoDir, File hookDir, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, boolean sslVerify)voiddeleteRef(org.eclipse.jgit.lib.Ref ref)List<org.uberfire.java.nio.base.FileDiff>diffRefs(String branchA, String branchB)voidenableKetch()voidfetch(org.eclipse.jgit.transport.CredentialsProvider credential, org.uberfire.commons.data.Pair<String,String> remote, Collection<org.eclipse.jgit.transport.RefSpec> refSpecs)static Gitfork(File gitRepoContainerDir, String origin, String name, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir)static Gitfork(File gitRepoContainerDir, String origin, String name, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir, boolean sslVerify)voidgc()org.eclipse.jgit.revwalk.RevCommitgetCommit(String commitId)org.eclipse.jgit.revwalk.RevCommitgetCommonAncestorCommit(String branchA, String branchB)org.eclipse.jgit.revwalk.RevCommitgetFirstCommit(org.eclipse.jgit.lib.Ref ref)org.eclipse.jgit.internal.ketch.KetchLeadergetKetchLeader()org.eclipse.jgit.revwalk.RevCommitgetLastCommit(String refName)org.eclipse.jgit.revwalk.RevCommitgetLastCommit(org.eclipse.jgit.lib.Ref ref)PathInfogetPathInfo(String branchName, String path)org.eclipse.jgit.lib.RefgetRef(String ref)org.eclipse.jgit.lib.RepositorygetRepository()org.eclipse.jgit.lib.ObjectIdgetTreeFromRef(String treeRef)booleanisHEADInitialized()booleanisKetchEnabled()List<org.eclipse.jgit.revwalk.RevCommit>listCommits(String startCommitId, String endCommitId)List<org.eclipse.jgit.revwalk.RevCommit>listCommits(org.eclipse.jgit.lib.ObjectId startRange, org.eclipse.jgit.lib.ObjectId endRange)CommitHistorylistCommits(org.eclipse.jgit.lib.Ref ref, String path)List<org.eclipse.jgit.diff.DiffEntry>listDiffs(String startCommitId, String endCommitId)List<org.eclipse.jgit.diff.DiffEntry>listDiffs(org.eclipse.jgit.lib.ObjectId refA, org.eclipse.jgit.lib.ObjectId refB)List<PathInfo>listPathContent(String branchName, String path)List<org.eclipse.jgit.lib.Ref>listRefs()Map<String,File>mapDiffContent(String branch, String startCommitId, String endCommitId)List<String>merge(String source, String target)List<String>merge(String source, String target, boolean noFastForward, boolean squash, CommitInfo commitInfo)voidpush(org.eclipse.jgit.transport.CredentialsProvider credentialsProvider, org.uberfire.commons.data.Pair<String,String> remote, boolean force, Collection<org.eclipse.jgit.transport.RefSpec> refSpecs)voidrefUpdate(String branch, org.eclipse.jgit.revwalk.RevCommit commit)voidremoveRemote(String remote, String ref)booleanresetWithSquash(String commitMessage)booleanresetWithSquash(String branch, String commitMessage)List<org.eclipse.jgit.lib.ObjectId>resolveObjectIds(String... commits)org.eclipse.jgit.revwalk.RevCommitresolveRevCommit(org.eclipse.jgit.lib.ObjectId objectId)booleanrevertMerge(String source, String target, String commonAncestorCommitId, String mergeCommitId)voidsetHeadAsInitialized()voidsquash(String branch, String startCommit, String commitMessage)voidsyncRemote(org.uberfire.commons.data.Pair<String,String> remote)List<org.uberfire.java.nio.base.TextualDiff>textualDiffRefs(String branchA, String branchB)List<org.uberfire.java.nio.base.TextualDiff>textualDiffRefs(String branchA, String branchB, String commitIdBranchA, String commitIdBranchB)voidupdateLeaders(org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders)List<org.eclipse.jgit.transport.RefSpec>updateRemoteConfig(org.uberfire.commons.data.Pair<String,String> remote, Collection<org.eclipse.jgit.transport.RefSpec> refSpecs)voidupdateRepo(org.eclipse.jgit.lib.Repository repo)
-
-
-
Method Detail
-
createRepository
static Git createRepository(File repoDir, File hookDir, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders)
-
createRepository
static Git createRepository(File repoDir, File hookDir, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, boolean sslVerify)
-
fork
static Git fork(File gitRepoContainerDir, String origin, String name, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir)
-
fork
static Git fork(File gitRepoContainerDir, String origin, String name, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir, boolean sslVerify)
-
clone
static Git clone(File repoDest, String origin, boolean isMirror, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir)
-
clone
static Git clone(File repoDest, String origin, boolean isMirror, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir, boolean sslVerify)
-
cloneSubdirectory
static Git cloneSubdirectory(File repoDest, String origin, String subdirectory, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir)
-
cloneSubdirectory
static Git cloneSubdirectory(File repoDest, String origin, String subdirectory, List<String> branches, org.eclipse.jgit.transport.CredentialsProvider credential, org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders, File hookDir, boolean sslVerify)
-
convertRefTree
void convertRefTree()
-
deleteRef
void deleteRef(org.eclipse.jgit.lib.Ref ref)
-
getRef
org.eclipse.jgit.lib.Ref getRef(String ref)
-
push
void push(org.eclipse.jgit.transport.CredentialsProvider credentialsProvider, org.uberfire.commons.data.Pair<String,String> remote, boolean force, Collection<org.eclipse.jgit.transport.RefSpec> refSpecs) throws org.eclipse.jgit.api.errors.InvalidRemoteException- Throws:
org.eclipse.jgit.api.errors.InvalidRemoteException
-
gc
void gc()
-
getCommit
org.eclipse.jgit.revwalk.RevCommit getCommit(String commitId)
-
getLastCommit
org.eclipse.jgit.revwalk.RevCommit getLastCommit(String refName)
-
getLastCommit
org.eclipse.jgit.revwalk.RevCommit getLastCommit(org.eclipse.jgit.lib.Ref ref) throws IOException- Throws:
IOException
-
getCommonAncestorCommit
org.eclipse.jgit.revwalk.RevCommit getCommonAncestorCommit(String branchA, String branchB)
-
listCommits
CommitHistory listCommits(org.eclipse.jgit.lib.Ref ref, String path) throws IOException, org.eclipse.jgit.api.errors.GitAPIException
- Throws:
IOExceptionorg.eclipse.jgit.api.errors.GitAPIException
-
listCommits
List<org.eclipse.jgit.revwalk.RevCommit> listCommits(String startCommitId, String endCommitId)
-
listCommits
List<org.eclipse.jgit.revwalk.RevCommit> listCommits(org.eclipse.jgit.lib.ObjectId startRange, org.eclipse.jgit.lib.ObjectId endRange)
-
getRepository
org.eclipse.jgit.lib.Repository getRepository()
-
getTreeFromRef
org.eclipse.jgit.lib.ObjectId getTreeFromRef(String treeRef)
-
fetch
void fetch(org.eclipse.jgit.transport.CredentialsProvider credential, org.uberfire.commons.data.Pair<String,String> remote, Collection<org.eclipse.jgit.transport.RefSpec> refSpecs) throws org.eclipse.jgit.api.errors.InvalidRemoteException- Throws:
org.eclipse.jgit.api.errors.InvalidRemoteException
-
syncRemote
void syncRemote(org.uberfire.commons.data.Pair<String,String> remote) throws org.eclipse.jgit.api.errors.InvalidRemoteException
- Throws:
org.eclipse.jgit.api.errors.InvalidRemoteException
-
merge
List<String> merge(String source, String target, boolean noFastForward, boolean squash, CommitInfo commitInfo)
-
revertMerge
boolean revertMerge(String source, String target, String commonAncestorCommitId, String mergeCommitId)
-
cherryPick
void cherryPick(JGitPathImpl target, String... commits)
-
textualDiffRefs
List<org.uberfire.java.nio.base.TextualDiff> textualDiffRefs(String branchA, String branchB)
-
textualDiffRefs
List<org.uberfire.java.nio.base.TextualDiff> textualDiffRefs(String branchA, String branchB, String commitIdBranchA, String commitIdBranchB)
-
resetWithSquash
boolean resetWithSquash(String commitMessage) throws IOException
- Throws:
IOException
-
resetWithSquash
boolean resetWithSquash(String branch, String commitMessage) throws IOException
- Throws:
IOException
-
commit
boolean commit(String branchName, CommitInfo commitInfo, boolean amend, org.eclipse.jgit.lib.ObjectId originId, CommitContent content)
-
listDiffs
List<org.eclipse.jgit.diff.DiffEntry> listDiffs(String startCommitId, String endCommitId)
-
listDiffs
List<org.eclipse.jgit.diff.DiffEntry> listDiffs(org.eclipse.jgit.lib.ObjectId refA, org.eclipse.jgit.lib.ObjectId refB)
-
mapDiffContent
Map<String,File> mapDiffContent(String branch, String startCommitId, String endCommitId)
-
blobAsInputStream
InputStream blobAsInputStream(String treeRef, String path)
-
getFirstCommit
org.eclipse.jgit.revwalk.RevCommit getFirstCommit(org.eclipse.jgit.lib.Ref ref) throws IOException- Throws:
IOException
-
listRefs
List<org.eclipse.jgit.lib.Ref> listRefs()
-
resolveRevCommit
org.eclipse.jgit.revwalk.RevCommit resolveRevCommit(org.eclipse.jgit.lib.ObjectId objectId) throws IOException- Throws:
IOException
-
updateRemoteConfig
List<org.eclipse.jgit.transport.RefSpec> updateRemoteConfig(org.uberfire.commons.data.Pair<String,String> remote, Collection<org.eclipse.jgit.transport.RefSpec> refSpecs) throws IOException, URISyntaxException
- Throws:
IOExceptionURISyntaxException
-
isHEADInitialized
boolean isHEADInitialized()
-
setHeadAsInitialized
void setHeadAsInitialized()
-
refUpdate
void refUpdate(String branch, org.eclipse.jgit.revwalk.RevCommit commit) throws IOException, org.eclipse.jgit.api.errors.ConcurrentRefUpdateException
- Throws:
IOExceptionorg.eclipse.jgit.api.errors.ConcurrentRefUpdateException
-
getKetchLeader
org.eclipse.jgit.internal.ketch.KetchLeader getKetchLeader()
-
isKetchEnabled
boolean isKetchEnabled()
-
enableKetch
void enableKetch()
-
updateRepo
void updateRepo(org.eclipse.jgit.lib.Repository repo)
-
updateLeaders
void updateLeaders(org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders)
-
-