Modifier and Type | Class and Description |
---|---|
static class |
GitRebaseCommandParameters.Builder |
Modifier and Type | Method and Description |
---|---|
com.atlassian.bitbucket.repository.Branch |
getBranch()
Retrieves the branch which should be rebased.
|
com.atlassian.bitbucket.user.ApplicationUser |
getCommitter() |
String |
getUpstream()
Retrieves the commit to compare the
branch against and to serve as the starting point
for the rebased commits. |
Optional<com.atlassian.bitbucket.repository.Repository> |
getUpstreamRepository()
|
boolean |
isCommitRequired()
Retrieves a flag indicating whether a rebase is required to produce at least one commit, or whether it
is allowed to reset the
branch to the upstream commit as-is. |
boolean |
isDryRun() |
@Nonnull public com.atlassian.bitbucket.repository.Branch getBranch()
upstream
, will be recreated as descendants of the upstream
commit.
git rebase
allows starting from a specific commit (detached HEAD
, not just branches, but
performing a rebase via this API intentionally does not. The rebase is performed in a temporary
work tree, since git rebase
cannot be run in bare repositories, and a specific branch to update
is required in order to fetch the rebased commits back into the bare repository.
@Nonnull public com.atlassian.bitbucket.user.ApplicationUser getCommitter()
@Nonnull public String getUpstream()
branch
against and to serve as the starting point
for the rebased commits. This value must be specified as a full 40-character SHA-1. using a ref
name is not supported.branch
's unique commits against@Nonnull public Optional<com.atlassian.bitbucket.repository.Repository> getUpstreamRepository()
public boolean isCommitRequired()
branch
to the upstream commit
as-is.
Regardless of the number of unique commits on the branch
, if all of their individual
changes have already been applied in a compatible way on the upstream
(such
that no conflicts arise), the rebase may discard all of the branch's commits. In some cases that may be
desirable, and in some it may not.
true
if the rebase should fail if all of the branch's
commits
are discarded; otherwise, false
to allow the branch to be reset to the upstream commit
public boolean isDryRun()
true
to perform the rebase without updating the branch
; otherwise,
false
to apply the rebase and update the branchCopyright © 2019 Atlassian. All rights reserved.