Package org.eclipse.jgit.lib
Class BranchTrackingStatus
- java.lang.Object
-
- org.eclipse.jgit.lib.BranchTrackingStatus
-
public class BranchTrackingStatus extends java.lang.Object
Status of a branch's relation to its remote-tracking branch.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAheadCount()
int
getBehindCount()
java.lang.String
getRemoteTrackingBranch()
static BranchTrackingStatus
of(Repository repository, java.lang.String branchName)
Compute the tracking status for thebranchName
inrepository
.
-
-
-
Method Detail
-
of
public static BranchTrackingStatus of(Repository repository, java.lang.String branchName) throws java.io.IOException
Compute the tracking status for thebranchName
inrepository
.- Parameters:
repository
- the git repository to compute the status frombranchName
- the local branch- Returns:
- the tracking status, or null if it is not known
- Throws:
java.io.IOException
-
getRemoteTrackingBranch
public java.lang.String getRemoteTrackingBranch()
- Returns:
- full remote-tracking branch name
-
getAheadCount
public int getAheadCount()
- Returns:
- number of commits that the local branch is ahead of the remote-tracking branch
-
getBehindCount
public int getBehindCount()
- Returns:
- number of commits that the local branch is behind of the remote-tracking branch
-
-