| Modifier and Type | Class and Description |
|---|---|
| public static enum | BranchConfig.
Config values for branch.[name].rebase (and pull.rebase). |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final Config | |
| public static final String | LOCAL_REPOSITORY
The value that means "local repository" for |
| Access | Constructor and Description |
|---|---|
| public | BranchConfig(Config
the config to read from config, String the short branch name of the section to read branchName)Create a new branch config, which will read configuration from config about specified branch. |
| Modifier and Type | Method and Description |
|---|---|
| private String | Returns: full remote tracking branch name or nullRemote name remote, String merge Ref of the local branch tracking the remote tracking
branch mergeRef)Finds the tracked remote tracking branch |
| public String | Returns: the name of the upstream branch as it is called on the remote, ornull if not definedGet the name of the upstream branch as it is called on the remote |
| public String | Returns: the remote this branch is configured to push to, ornull
if not definedGet the remote this branch is configured to push to. |
| public BranchConfig. | Returns: theorg.Retrieves the config value of branch.[name].rebase. |
| public String | Returns: the remote this branch is configured to fetch from/push to, ornull if not definedGet the remote this branch is configured to fetch from/push to |
| private String | |
| public String | Returns: the full remote-tracking branch name ornull if it could
not be determined. If you also want local tracked branches use
getTrackingBranch() instead.Get the full remote-tracking branch name |
| public String | Returns: the full tracking branch name ornull if it could
not be determinedGet the full tracking branch name |
| public boolean | Returns: true if the branch is configured to be rebasedWhether the branch is configured to be rebased |
| public boolean | Returns: true if the "remote" setting points to the local
repository (with .), false otherwiseWhether the "remote" setting points to the local repository (with .) |
| branchName | back to summary |
|---|---|
| private final String branchName | |
| config | back to summary |
|---|---|
| private final Config config | |
| LOCAL_REPOSITORY | back to summary |
|---|---|
| public static final String LOCAL_REPOSITORY The value that means "local repository" for
| |
| BranchConfig | back to summary |
|---|---|
| public BranchConfig(Config config, String branchName) Create a new branch config, which will read configuration from config about specified branch. | |
| findRemoteTrackingBranch | back to summary |
|---|---|
| private String findRemoteTrackingBranch(String remote, String mergeRef) Finds the tracked remote tracking branch | |
| getMerge | back to summary |
|---|---|
| public String getMerge() Get the name of the upstream branch as it is called on the remote
| |
| getPushRemote | back to summary |
|---|---|
| public String getPushRemote() Get the remote this branch is configured to push to.
| |
| getRebaseMode | back to summary |
|---|---|
| public BranchConfig. Retrieves the config value of branch.[name].rebase.
| |
| getRemote | back to summary |
|---|---|
| public String getRemote() Get the remote this branch is configured to fetch from/push to
| |
| getRemoteOrDefault | back to summary |
|---|---|
| private String getRemoteOrDefault() | |
| getRemoteTrackingBranch | back to summary |
|---|---|
| public String getRemoteTrackingBranch() Get the full remote-tracking branch name
| |
| getTrackingBranch | back to summary |
|---|---|
| public String getTrackingBranch() Get the full tracking branch name
| |
| isRebase | back to summary |
|---|---|
| public boolean isRebase() Whether the branch is configured to be rebased
| |
| isRemoteLocal | back to summary |
|---|---|
| public boolean isRemoteLocal() Whether the "remote" setting points to the local repository (with .)
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final BranchConfig. | INTERACTIVE
Value for rebasing interactively |
| public static final BranchConfig. | MERGES
Value for rebasing preserving local merge commits |
| public static final BranchConfig. | NONE
Value for not rebasing at all but merging |
| public static final BranchConfig. | REBASE
Value for rebasing |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | matchConfigValue(String
the string to match s)Implements org. Checks if the given string matches with enum value. |
| public String | toConfigValue()
Implements org. Converts enumeration value into a string to be save in config. |
| public static BranchConfig. | |
| public static BranchConfig. |
| configValue | back to summary |
|---|---|
| private final String configValue | |
| INTERACTIVE | back to summary |
|---|---|
| public static final BranchConfig. Value for rebasing interactively | |
| MERGES | back to summary |
|---|---|
| public static final BranchConfig. Value for rebasing preserving local merge commits
| |
| NONE | back to summary |
|---|---|
| public static final BranchConfig. Value for not rebasing at all but merging | |
| REBASE | back to summary |
|---|---|
| public static final BranchConfig. Value for rebasing | |
| BranchRebaseMode | back to summary |
|---|---|
| private BranchRebaseMode(String configValue) | |
| matchConfigValue | back to summary |
|---|---|
| public boolean matchConfigValue(String s) Implements org. Doc from org. Checks if the given string matches with enum value. | |
| toConfigValue | back to summary |
|---|---|
| public String toConfigValue() Implements org. Doc from org. Converts enumeration value into a string to be save in config. | |
| valueOf | back to summary |
|---|---|
| public static BranchConfig. | |
| values | back to summary |
|---|---|
| public static BranchConfig. | |