org.eclipse.jgit.lib
Class BranchTrackingStatus

java.lang.Object
  extended by org.eclipse.jgit.lib.BranchTrackingStatus

public class BranchTrackingStatus
extends Object

Status of a branch's relation to its remote-tracking branch.


Method Summary
 int getAheadCount()
           
 int getBehindCount()
           
 String getRemoteTrackingBranch()
           
static BranchTrackingStatus of(Repository repository, String branchName)
          Compute the tracking status for the branchName in repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

of

public static BranchTrackingStatus of(Repository repository,
                                      String branchName)
                               throws IOException
Compute the tracking status for the branchName in repository.

Parameters:
repository - the git repository to compute the status from
branchName - the local branch
Returns:
the tracking status, or null if it is not known
Throws:
IOException

getRemoteTrackingBranch

public 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


Copyright © 2013. All Rights Reserved.