Package org.eclipse.jgit.lib
Class BranchTrackingStatus
java.lang.Object
org.eclipse.jgit.lib.BranchTrackingStatus
Status of a branch's relation to its remote-tracking branch.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBranchTrackingStatus(String remoteTrackingBranch, int aheadCount, int behindCount) -
Method Summary
Modifier and TypeMethodDescriptionintGet number of commits that the local branch is ahead of the remote-tracking branchintGet number of commits that the local branch is behind of the remote-tracking branchGet full remote-tracking branch namestatic BranchTrackingStatusof(Repository repository, String branchName) Compute the tracking status for thebranchNameinrepository.
-
Field Details
-
remoteTrackingBranch
-
aheadCount
private final int aheadCount -
behindCount
private final int behindCount
-
-
Constructor Details
-
BranchTrackingStatus
-
-
Method Details
-
of
Compute the tracking status for thebranchNameinrepository.- 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:
IOException
-
getRemoteTrackingBranch
Get full remote-tracking branch name- Returns:
- full remote-tracking branch name
-
getAheadCount
public int getAheadCount()Get number of commits that the local branch is ahead of the remote-tracking branch- Returns:
- number of commits that the local branch is ahead of the remote-tracking branch
-
getBehindCount
public int getBehindCount()Get number of commits that the local branch is behind of the remote-tracking branch- Returns:
- number of commits that the local branch is behind of the remote-tracking branch
-