Package org.eclipse.jgit.lib
Class BranchConfig
- java.lang.Object
-
- org.eclipse.jgit.lib.BranchConfig
-
public class BranchConfig extends java.lang.Object
Branch section of a Git configuration file.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LOCAL_REPOSITORY
The value that means "local repository" forgetRemote()
: "."
-
Constructor Summary
Constructors Constructor Description BranchConfig(Config config, java.lang.String branchName)
Create a new branch config, which will read configuration from config about specified branch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMerge()
java.lang.String
getRemote()
java.lang.String
getRemoteTrackingBranch()
java.lang.String
getTrackingBranch()
boolean
isRebase()
boolean
isRemoteLocal()
-
-
-
Field Detail
-
LOCAL_REPOSITORY
public static final java.lang.String LOCAL_REPOSITORY
The value that means "local repository" forgetRemote()
: "."- Since:
- 3.5
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BranchConfig
public BranchConfig(Config config, java.lang.String branchName)
Create a new branch config, which will read configuration from config about specified branch.- Parameters:
config
- the config to read frombranchName
- the short branch name of the section to read
-
-
Method Detail
-
getTrackingBranch
public java.lang.String getTrackingBranch()
- Returns:
- the full tracking branch name or
null
if it could not be determined
-
getRemoteTrackingBranch
public java.lang.String getRemoteTrackingBranch()
- Returns:
- the full remote-tracking branch name or
null
if it could not be determined. If you also want local tracked branches usegetTrackingBranch()
instead.
-
isRemoteLocal
public boolean isRemoteLocal()
- Returns:
true
if the "remote" setting points to the local repository (with "."), false otherwise- Since:
- 3.5
-
getRemote
public java.lang.String getRemote()
- Returns:
- the remote this branch is configured to fetch from/push to, or
null
if not defined - Since:
- 3.5
-
getMerge
public java.lang.String getMerge()
- Returns:
- the name of the upstream branch as it is called on the remote, or
null
if not defined - Since:
- 3.5
-
isRebase
public boolean isRebase()
- Returns:
true
if the branch is configured to be rebased- Since:
- 3.5
-
-