Package com._1c.g5.v8.dt.team.git
Class GitUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.team.git.GitUtil
-
public final class GitUtil extends Object
Team Git util.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetShortenUpstreamBranchName(String branchName, org.eclipse.jgit.lib.Repository repository)Returns shorten upstream branch name (remote + shorten merge).static StringgetShortenUpstreamBranchName(org.eclipse.jgit.lib.Ref ref, org.eclipse.jgit.lib.Repository repository)Returns shorten upstream branch name (remote + shorten merge).static booleanisRefCheckedOut(org.eclipse.jgit.lib.Ref ref, org.eclipse.jgit.lib.Repository repository)Checks the ref is checked out in repository.static booleanisRemoteBranch(String branchName, org.eclipse.jgit.lib.Repository repository)Checks is branch remote.
-
-
-
Method Detail
-
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 benullrepository- the git repository, cannot benull- Returns:
trueif ref is checked out,falseotherwise
-
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 benullrepository- the git repository, cannot benull- Returns:
- the shorten upstream branch name or
nullif 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 benullrepository- the git repository, cannot benull- Returns:
- the shorten upstream branch name or
nullif 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 benullrepository- the git repository, cannot benull- Returns:
trueif branch is remote,falseotherwise
-
-