public class BranchTrackingStatus
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
aheadCount |
private int |
behindCount |
private java.lang.String |
remoteTrackingBranch |
Modifier | Constructor and Description |
---|---|
private |
BranchTrackingStatus(java.lang.String remoteTrackingBranch,
int aheadCount,
int behindCount) |
Modifier and Type | Method and Description |
---|---|
int |
getAheadCount()
Get number of commits that the local branch is ahead of the
remote-tracking branch
|
int |
getBehindCount()
Get number of commits that the local branch is behind of the
remote-tracking branch
|
java.lang.String |
getRemoteTrackingBranch()
Get full remote-tracking branch name
|
static BranchTrackingStatus |
of(Repository repository,
java.lang.String branchName)
Compute the tracking status for the
branchName in
repository . |
private final java.lang.String remoteTrackingBranch
private final int aheadCount
private final int behindCount
private BranchTrackingStatus(java.lang.String remoteTrackingBranch, int aheadCount, int behindCount)
public static BranchTrackingStatus of(Repository repository, java.lang.String branchName) throws java.io.IOException
branchName
in
repository
.repository
- the git repository to compute the status frombranchName
- the local branchjava.io.IOException
public java.lang.String getRemoteTrackingBranch()
public int getAheadCount()
public int getBehindCount()