object JGitUtil
Provides complex JGit operations.
- Alphabetic
- By Inheritance
- JGitUtil
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class BlameInfo(id: String, authorName: String, authorEmailAddress: String, authorTime: Date, prev: Option[String], prevPath: Option[String], commitTime: Date, message: String, lines: Set[Int]) extends Product with Serializable
- case class BranchInfo(name: String, committerName: String, commitTime: Date, committerEmailAddress: String, mergeInfo: Option[BranchMergeInfo], commitId: String) extends Product with Serializable
- case class BranchMergeInfo(ahead: Int, behind: Int, isMerged: Boolean) extends Product with Serializable
- case class CommitInfo(id: String, shortMessage: String, fullMessage: String, parents: List[String], authorTime: Date, authorName: String, authorEmailAddress: String, commitTime: Date, committerName: String, committerEmailAddress: String, commitSign: Option[GpgSignInfo], verified: Option[GpgVerifyInfo]) extends Product with Serializable
The commit data.
The commit data.
- id
the commit id
- shortMessage
the short message
- fullMessage
the full message
- parents
the list of parent commit id
- authorTime
the author time
- authorName
the author name
- authorEmailAddress
the mail address of the author
- commitTime
the commit time
- committerName
the committer name
- committerEmailAddress
the mail address of the committer
- case class ContentInfo(viewType: String, size: Option[Long], content: Option[String], charset: Option[String]) extends Product with Serializable
The file content data for the file content view of the repository viewer.
The file content data for the file content view of the repository viewer.
- viewType
"image", "large" or "other"
- size
total size of object in bytes
- content
the string content
- charset
the character encoding
- case class DiffInfo(changeType: ChangeType, oldPath: String, newPath: String, oldContent: Option[String], newContent: Option[String], oldIsImage: Boolean, newIsImage: Boolean, oldObjectId: Option[String], newObjectId: Option[String], oldMode: String, newMode: String, tooLarge: Boolean, patch: Option[String]) extends Product with Serializable
- case class FileInfo(id: ObjectId, isDirectory: Boolean, name: String, path: String, message: String, commitId: String, time: Date, author: String, mailAddress: String, linkUrl: Option[String]) extends Product with Serializable
The file data for the file list of the repository viewer.
The file data for the file list of the repository viewer.
- id
the object id
- isDirectory
whether is it directory
- name
the file (or directory) name
- path
the file (or directory) complete path
- message
the last commit message
- commitId
the last commit id
- time
the last modified time
- author
the last committer name
- mailAddress
the committer's mail address
- linkUrl
the url of submodule
- case class GpgSignInfo(signArmored: Array[Byte], target: Array[Byte]) extends Product with Serializable
The gpg commit sign data.
The gpg commit sign data.
- signArmored
signature for commit
- target
string for verification target
- case class GpgVerifyInfo(signedUser: String, signedKeyId: String) extends Product with Serializable
The verified gpg sign data.
- case class RepositoryInfo(owner: String, name: String, branchList: List[String], tags: List[TagInfo]) extends Product with Serializable
The repository data.
The repository data.
- owner
the user name of the repository owner
- name
the repository name
- branchList
the list of branch names
- tags
the list of tags
- case class SubmoduleInfo(name: String, path: String, repositoryUrl: String, viewerUrl: String) extends Product with Serializable
The submodule data
The submodule data
- name
the module name
- path
the path in the repository
- repositoryUrl
the repository url of this module
- viewerUrl
the repository viewer url of this module
- case class TagInfo(name: String, time: Date, commitId: String, message: String, objectId: String) extends Product with Serializable
The tag data.
The tag data.
- name
the tag name
- time
the tagged date
- commitId
the commit id
- message
the message of the tagged commit
- objectId
the tag object id
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def cloneRepository(from: File, to: File): Unit
- def createBranch(git: Git, fromBranch: String, newBranch: String): Either[String, String]
- def createDirCacheEntry(path: String, mode: FileMode, objectId: ObjectId): DirCacheEntry
- def createNewCommit(git: Git, inserter: ObjectInserter, headId: AnyObjectId, treeId: AnyObjectId, ref: String, fullName: String, mailAddress: String, message: String): ObjectId
- def createTag(git: Git, name: String, message: Option[String], commitId: String): Either[String, String]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getAllCommitIds(git: Git): Seq[String]
Returns all commit id in the specified repository.
- def getAllFileListByTreeId(git: Git, treeId: String): List[String]
get all file list by tree object id.
- def getBlame(git: Git, id: String, path: String): Iterable[BlameInfo]
- def getBranches(git: Git, defaultBranch: String, origin: Boolean): Seq[BranchInfo]
- def getBranchesOfCommit(git: Git, commitId: String): List[String]
Returns the list of branch names of the specified commit.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getCommitCount(git: Git, branch: String, max: Int = 10001): Int
Returns the number of commits in the specified branch or commit.
Returns the number of commits in the specified branch or commit. If the specified branch has over 10000 commits, this method returns 100001.
- def getCommitLog(git: Git, from: String, to: String): List[CommitInfo]
Returns the commit list between two revisions.
Returns the commit list between two revisions.
- git
the Git object
- from
the from revision
- to
the to revision
- returns
the commit list
- def getCommitLog(git: Git, revision: String, page: Int = 1, limit: Int = 0, path: String = ""): Either[String, (List[CommitInfo], Boolean)]
Returns the commit list of the specified branch.
Returns the commit list of the specified branch.
- git
the Git object
- revision
the branch name or commit id
- page
the page number (1-)
- limit
the number of commit info per page. 0 (default) means unlimited.
- path
filters by this path. default is no filter.
- returns
a tuple of the commit list and whether has next, or the error message
- def getCommitLogs(git: Git, begin: String, includesLastCommit: Boolean = false)(endCondition: (RevCommit) => Boolean): List[CommitInfo]
- def getContentFromId(git: Git, id: ObjectId, fetchLargeFile: Boolean): Option[Array[Byte]]
Get object content of the given object id as byte array from the Git repository.
Get object content of the given object id as byte array from the Git repository.
- git
the Git object
- id
the object id
- fetchLargeFile
if false then returns None for the large file
- returns
the byte array of content or None if object does not exist
- def getContentFromPath(git: Git, revTree: RevTree, path: String, fetchLargeFile: Boolean): Option[Array[Byte]]
Get object content of the given path as byte array from the Git repository.
Get object content of the given path as byte array from the Git repository.
- git
the Git object
- revTree
the rev tree
- path
the path
- fetchLargeFile
if false then returns None for the large file
- returns
the byte array of content or None if object does not exist
- def getContentInfo(git: Git, path: String, objectId: ObjectId, safeMode: Boolean): ContentInfo
- def getContentSize(loader: ObjectLoader): Long
- def getDefaultBranch(git: Git, repository: service.RepositoryService.RepositoryInfo, revstr: String = ""): Option[(ObjectId, String)]
- def getDiffs(git: Git, from: Option[String], to: String, fetchContent: Boolean, makePatch: Boolean): List[DiffInfo]
- def getFileList(git: Git, revision: String, path: String = ".", baseUrl: Option[String] = None, commitCount: Int = 0, maxFiles: Int = 5): List[FileInfo]
Returns the file list of the specified path.
Returns the file list of the specified path.
- git
the Git object
- revision
the branch name or commit id
- path
the directory path (optional)
- baseUrl
the base url of GitBucket instance. This parameter is used to generate links of submodules (optional)
- commitCount
the number of commit of this repository (optional). If this number is greater than threshold, the commit info is cached in memory.
- maxFiles
don't fetch commit info if the number of files in the directory is bigger than this number.
- returns
The list of files in the specified directory. If the number of files are greater than threshold, the returned file list won't include the commit info.
- def getForkedCommitId(oldGit: Git, newGit: Git, userName: String, repositoryName: String, branch: String, requestUserName: String, requestRepositoryName: String, requestBranch: String): String
Returns the identifier of the root commit (or latest merge commit) of the specified branch.
- def getLastModifiedCommit(git: Git, startCommit: RevCommit, path: String): RevCommit
Returns the last modified commit of specified path
Returns the last modified commit of specified path
- git
the Git object
- startCommit
the search base commit id
- path
the path of target file or directory
- returns
the last modified commit of specified path
- def getLatestCommitFromPath(git: Git, path: String, revision: String): Option[RevCommit]
Returns the latest RevCommit of the specified path.
Returns the latest RevCommit of the specified path.
- git
the Git object
- path
the path
- revision
the branch name or commit id
- returns
the latest commit
- def getLatestCommitFromPaths(git: Git, paths: List[String], revision: String): Map[String, RevCommit]
Returns the list of latest RevCommit of the specified paths.
Returns the list of latest RevCommit of the specified paths.
- git
the Git object
- paths
the list of paths
- revision
the branch name or commit id
- returns
the list of latest commit
- def getLfsObjects(text: String): Map[String, String]
- def getObjectLoaderFromId[A](git: Git, id: ObjectId)(f: (ObjectLoader) => A): Option[A]
Get objectLoader of the given object id from the Git repository.
Get objectLoader of the given object id from the Git repository.
- git
the Git object
- id
the object id
- f
the function process ObjectLoader
- returns
None if object does not exist
- def getParentCommitId(git: Git, id: String): Option[String]
- def getPatch(git: Git, from: Option[String], to: String): String
- def getRepositoryInfo(owner: String, repository: String): RepositoryInfo
Returns the repository information.
Returns the repository information. It contains branch names and tag names.
- def getRevCommitFromId(git: Git, objectId: ObjectId): RevCommit
Returns RevCommit from the commit or tag id.
Returns RevCommit from the commit or tag id.
- git
the Git object
- objectId
the ObjectId of the commit or tag
- returns
the RevCommit for the specified commit or tag
- def getShaByRef(owner: String, name: String, revstr: String): Option[String]
Returns sha1
Returns sha1
- owner
repository owner
- name
repository name
- revstr
A git object references expression
- returns
sha1
- def getSubmodules(git: Git, tree: RevTree, baseUrl: Option[String]): List[SubmoduleInfo]
Read submodule information from .gitmodules
- def getTagsOfCommit(git: Git, commitId: String): List[String]
Returns the list of tags which contains the specified commit.
- def getTagsOnCommit(git: Git, commitId: String): List[String]
Returns the list of tags which pointed on the specified commit.
- def getTreeId(git: Git, revision: String): Option[String]
get all file list by revision.
get all file list by revision. only file.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def initRepository(dir: File): Unit
- def isEmpty(git: Git): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLfsPointer(loader: ObjectLoader): Boolean
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit val objectDatabaseReleasable: Releasable[ObjectDatabase]
- def openFile[T](git: Git, repository: service.RepositoryService.RepositoryInfo, tree: RevTree, path: String)(f: (InputStream) => T): T
- def processTree[T](git: Git, id: ObjectId)(f: (String, CanonicalTreeParser) => T): Seq[T]
- def removeCache(git: Git): Unit
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def updatePullRequest(userName: String, repositoryName: String, branch: String, issueId: Int, requestUserName: String, requestRepositoryName: String, requestBranch: String): (String, String)
Fetch pull request contents into refs/pull/${issueId}/head and return (commitIdTo, commitIdFrom)
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()