Class GitUtil

java.lang.Object
com._1c.g5.v8.dt.team.git.GitUtil

public final class GitUtil extends Object
Team Git util.
  • Method Details

    • isRefCheckedOut

      public static boolean isRefCheckedOut(org.eclipse.jgit.lib.Ref ref, org.eclipse.jgit.lib.Repository repository)
      Checks the ref is checked out in repository.
      Parameters:
      ref - the git ref, cannot be null
      repository - the git repository, cannot be null
      Returns:
      true if ref is checked out, false otherwise
    • getShortenUpstreamBranchName

      public static String getShortenUpstreamBranchName(String branchName, org.eclipse.jgit.lib.Repository repository)
      Returns shorten upstream branch name (remote + shorten merge).
      Parameters:
      branchName - the git branch shorten name, cannot be null
      repository - the git repository, cannot be null
      Returns:
      the shorten upstream branch name or null if not found
    • getShortenUpstreamBranchName

      public static String getShortenUpstreamBranchName(org.eclipse.jgit.lib.Ref ref, org.eclipse.jgit.lib.Repository repository)
      Returns shorten upstream branch name (remote + shorten merge).
      Parameters:
      ref - the git ref, cannot be null
      repository - the git repository, cannot be null
      Returns:
      the shorten upstream branch name or null if not found
    • isRemoteBranch

      public static boolean isRemoteBranch(String branchName, org.eclipse.jgit.lib.Repository repository)
      Checks is branch remote.
      Parameters:
      branchName - the git branch name, cannot be null
      repository - the git repository, cannot be null
      Returns:
      true if branch is remote, false otherwise