Object

gitbucket.core.util

JGitUtil

Related Doc: package util

Permalink

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

    Permalink
  2. case class BranchInfo(name: String, committerName: String, commitTime: Date, committerEmailAddress: String, mergeInfo: Option[BranchMergeInfo], commitId: String) extends Product with Serializable

    Permalink
  3. case class BranchMergeInfo(ahead: Int, behind: Int, isMerged: Boolean) extends Product with Serializable

    Permalink
  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

    Permalink

    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, content: Option[String], charset: Option[String]) extends Product with Serializable

    Permalink

    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"

    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) extends Product with Serializable

    Permalink
  7. case class FileInfo(id: ObjectId, isDirectory: Boolean, name: String, message: String, commitId: String, time: Date, author: String, mailAddress: String, linkUrl: Option[String]) extends Product with Serializable

    Permalink

    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

    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, commitCount: Int, branchList: List[String], tags: List[TagInfo]) extends Product with Serializable

    Permalink

    The repository data.

    The repository data.

    owner

    the user name of the repository owner

    name

    the repository name

    commitCount

    the commit count. If the repository has over 1000 commits then this property is 1001.

    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

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def cloneRepository(from: File, to: File): Unit

    Permalink
  7. def createBranch(git: Git, fromBranch: String, newBranch: String): Product with Serializable with Either[String, String]

    Permalink
  8. def createDirCacheEntry(path: String, mode: FileMode, objectId: ObjectId): DirCacheEntry

    Permalink
  9. def createNewCommit(git: Git, inserter: ObjectInserter, headId: AnyObjectId, treeId: AnyObjectId, ref: String, fullName: String, mailAddress: String, message: String): ObjectId

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def getAllCommitIds(git: Git): Seq[String]

    Permalink

    Returns all commit id in the specified repository.

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

    Permalink

    get all file list by tree object id.

  15. def getBlame(git: Git, id: String, path: String): Iterable[BlameInfo]

    Permalink
  16. def getBranches(owner: String, name: String, defaultBranch: String, origin: Boolean): Seq[BranchInfo]

    Permalink
  17. def getBranchesOfCommit(git: Git, commitId: String): List[String]

    Permalink

    Returns the list of branch names of the specified commit.

  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getCommitLog(git: Git, from: String, to: String): List[CommitInfo]

    Permalink

    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

  20. def getCommitLog(git: Git, revision: String, page: Int = 1, limit: Int = 0, path: String = ""): Either[String, (List[CommitInfo], Boolean)]

    Permalink

    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

  21. def getCommitLogs(git: Git, begin: String, includesLastCommit: Boolean = false)(endCondition: (RevCommit) ⇒ Boolean): List[CommitInfo]

    Permalink
  22. def getContentFromId(git: Git, id: ObjectId, fetchLargeFile: Boolean): Option[Array[Byte]]

    Permalink

    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

  23. def getContentFromPath(git: Git, revTree: RevTree, path: String, fetchLargeFile: Boolean): Option[Array[Byte]]

    Permalink

    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

  24. def getContentInfo(git: Git, path: String, objectId: ObjectId): ContentInfo

    Permalink
  25. def getDefaultBranch(git: Git, repository: service.RepositoryService.RepositoryInfo, revstr: String = ""): Option[(ObjectId, String)]

    Permalink
  26. def getDiffs(git: Git, from: String, to: String, fetchContent: Boolean): List[DiffInfo]

    Permalink
  27. def getDiffs(git: Git, id: String, fetchContent: Boolean = true): (List[DiffInfo], Option[String])

    Permalink

    Returns the tuple of diff of the given commit and the previous commit id.

  28. def getFileList(git: Git, revision: String, path: String = "."): List[FileInfo]

    Permalink

    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

  29. def getForkedCommitId(oldGit: Git, newGit: Git, userName: String, repositoryName: String, branch: String, requestUserName: String, requestRepositoryName: String, requestBranch: String): String

    Permalink

    Returns the identifier of the root commit (or latest merge commit) of the specified branch.

  30. def getLastModifiedCommit(git: Git, startCommit: RevCommit, path: String): RevCommit

    Permalink

    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

  31. def getLatestCommitFromPath(git: Git, path: String, revision: String): Option[RevCommit]

    Permalink

    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

  32. def getLatestCommitFromPaths(git: Git, paths: List[String], revision: String): Map[String, RevCommit]

    Permalink

    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

  33. def getObjectLoaderFromId[A](git: Git, id: ObjectId)(f: (ObjectLoader) ⇒ A): Option[A]

    Permalink

    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

  34. def getRepositoryInfo(owner: String, repository: String): RepositoryInfo

    Permalink

    Returns the repository information.

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

  35. def getRevCommitFromId(git: Git, objectId: ObjectId): RevCommit

    Permalink

    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

  36. def getShaByRef(owner: String, name: String, revstr: String): Option[String]

    Permalink

    Returns sha1

    Returns sha1

    owner

    repository owner

    name

    repository name

    revstr

    A git object references expression

    returns

    sha1

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

    Permalink

    Read submodule information from .gitmodules

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

    Permalink

    Returns the list of tags of the specified commit.

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

    Permalink

    get all file list by revision.

    get all file list by revision. only file.

  40. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  41. def initRepository(dir: File): Unit

    Permalink
  42. def isEmpty(git: Git): Boolean

    Permalink
  43. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  44. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  45. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  46. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  47. def processTree(git: Git, id: ObjectId)(f: (String, CanonicalTreeParser) ⇒ Unit): Unit

    Permalink
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  50. def updatePullRequest(userName: String, repositoryName: String, branch: String, issueId: Int, requestUserName: String, requestRepositoryName: String, requestBranch: String): (String, String)

    Permalink

    Fetch pull request contents into refs/pull/${issueId}/head and return (commitIdTo, commitIdFrom)

  51. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped