object JGitUtil

Provides complex JGit operations.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JGitUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. 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
  2. case class BranchInfo(name: String, committerName: String, commitTime: Date, committerEmailAddress: String, mergeInfo: Option[BranchMergeInfo], commitId: String) extends Product with Serializable
  3. case class BranchMergeInfo(ahead: Int, behind: Int, isMerged: Boolean) extends Product with Serializable
  4. case class CommitInfo(id: String, shortMessage: String, fullMessage: String, parents: List[String], authorTime: Date, authorName: String, authorEmailAddress: String, commitTime: Date, committerName: String, committerEmailAddress: String) 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

  5. 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

  6. 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
  7. 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

  8. 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

  9. case class SubmoduleInfo(name: String, path: String, url: String) extends Product with Serializable

    The submodule data

    The submodule data

    name

    the module name

    path

    the path in the repository

    url

    the repository url of this module

  10. case class TagInfo(name: String, time: Date, id: String) extends Product with Serializable

    The tag data.

    The tag data.

    name

    the tag name

    time

    the tagged date

    id

    the commit id

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def cloneRepository(from: File, to: File): Unit
  7. def createBranch(git: Git, fromBranch: String, newBranch: String): Either[String, String]
  8. def createDirCacheEntry(path: String, mode: FileMode, objectId: ObjectId): DirCacheEntry
  9. def createNewCommit(git: Git, inserter: ObjectInserter, headId: AnyObjectId, treeId: AnyObjectId, ref: String, fullName: String, mailAddress: String, message: String): ObjectId
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def getAllCommitIds(git: Git): Seq[String]

    Returns all commit id in the specified repository.

  14. def getAllFileListByTreeId(git: Git, treeId: String): List[String]

    get all file list by tree object id.

  15. def getBlame(git: Git, id: String, path: String): Iterable[BlameInfo]
  16. def getBranches(owner: String, name: String, defaultBranch: String, origin: Boolean): Seq[BranchInfo]
  17. def getBranchesOfCommit(git: Git, commitId: String): List[String]

    Returns the list of branch names of the specified commit.

  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getCommitCount(owner: String, repository: String, branch: String): 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.

  20. 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

  21. 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

  22. def getCommitLogs(git: Git, begin: String, includesLastCommit: Boolean = false)(endCondition: (RevCommit) ⇒ Boolean): List[CommitInfo]
  23. 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

  24. 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

  25. def getContentInfo(git: Git, path: String, objectId: ObjectId): ContentInfo
  26. def getContentSize(loader: ObjectLoader): Long
  27. def getDefaultBranch(git: Git, repository: service.RepositoryService.RepositoryInfo, revstr: String = ""): Option[(ObjectId, String)]
  28. def getDiffs(git: Git, from: Option[String], to: String, fetchContent: Boolean, makePatch: Boolean): List[DiffInfo]
  29. def getFileList(git: Git, revision: String, path: String = "."): 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)

    returns

    HTML of the file list

  30. 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.

  31. 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

  32. 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

  33. 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

  34. def getLfsObjects(text: String): Map[String, String]
  35. 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

  36. def getParentCommitId(git: Git, id: String): Option[String]
  37. def getPatch(git: Git, from: Option[String], to: String): String
  38. def getRepositoryInfo(owner: String, repository: String): RepositoryInfo

    Returns the repository information.

    Returns the repository information. It contains branch names and tag names.

  39. 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

  40. 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

  41. def getSubmodules(git: Git, tree: RevTree): List[SubmoduleInfo]

    Read submodule information from .gitmodules

  42. def getTagsOfCommit(git: Git, commitId: String): List[String]

    Returns the list of tags of the specified commit.

  43. def getTreeId(git: Git, revision: String): Option[String]

    get all file list by revision.

    get all file list by revision. only file.

  44. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  45. def initRepository(dir: File): Unit
  46. def isEmpty(git: Git): Boolean
  47. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  51. def processTree[T](git: Git, id: ObjectId)(f: (String, CanonicalTreeParser) ⇒ T): Seq[T]
  52. def removeCache(git: Git): Unit
  53. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  54. def toString(): String
    Definition Classes
    AnyRef → Any
  55. 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)

  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped