public interface GitOperationHelper
Modifier and Type | Method and Description |
---|---|
@NotNull String |
checkout(@Nullable File cacheDirectory,
@NotNull File sourceDirectory,
@NotNull String targetRevision,
@Nullable String previousRevision) |
boolean |
checkRevisionExistsInCacheRepository(@NotNull File repositoryDirectory,
@NotNull String targetRevision) |
default @NotNull String |
commit(@NotNull File sourceDirectory,
@NotNull String message,
@NotNull String committerName,
@NotNull String committerEmail) |
@NotNull String |
commit(@NotNull File sourceDirectory,
@NotNull String message,
@NotNull String committerName,
@NotNull String committerEmail,
boolean stageModifications) |
void |
createBranch(@NotNull File sourceDirectory,
@NotNull String branchName) |
void |
createLightweightTag(@NotNull File sourceDirectory,
@NotNull String tagName,
@NotNull String revision) |
BuildRepositoryChanges |
extractCommits(File cacheDirectory,
@NotNull String startingRevision,
String endingRevision) |
BuildRepositoryChanges |
extractCommits(File cacheDirectory,
@NotNull String startingRevision,
String endingRevision,
String path) |
BuildRepositoryChanges |
extractCommitsBetweenBranches(File cacheDirectory,
VcsBranch otherBranch,
boolean limitChangeList) |
void |
fetch(@NotNull File sourceDirectory,
@NotNull HashAndSource refAndHash,
boolean useShallow) |
void |
fetch(@NotNull File sourceDirectory,
@NotNull HashAndSource refAndHash,
boolean useShallow,
boolean fetchTagsByDefault) |
void |
fetch(@NotNull File sourceDirectory,
@NotNull String targetRevision,
boolean useShallow) |
void |
fetch(@NotNull File sourceDirectory,
@NotNull String targetRevision,
boolean useShallow,
boolean fetchTagsByDefault) |
@NotNull Optional<String> |
getBranchForSha(@NotNull File sourceDirectory,
String revision,
String configuredBranch) |
@NotNull CommitContext |
getCommit(File directory,
String targetRevision)
Gets the commit for the revision, given a working directory.
|
String |
getCurrentBranch(File checkoutPath) |
@NotNull String |
getCurrentRevision(@NotNull File sourceDirectory) |
@NotNull List<VcsBranch> |
getOpenBranches(@NotNull GitRepositoryAccessData repositoryData,
File workingDir) |
@Nullable String |
getShaOfRefIfExists(@NotNull File sourceDirectory,
@NotNull String ref) |
List<TagAndRevision> |
getTagsForRepository(@NotNull GitRepositoryAccessData accessData) |
boolean |
isAncestor(@NotNull Path gitWorkspace,
@NotNull GitHash rev1,
@NotNull GitHash rev2)
Returns true if you can reach rev1 by following parent relationship starting from rev2.
|
boolean |
isClean(@NotNull File sourceDirectory) |
boolean |
merge(@NotNull File workspaceDir,
@NotNull String targetRevision,
@NotNull String committerName,
@NotNull String committerEmail) |
Pair<Boolean,String> |
mergeAndReturnHead(@NotNull File workspaceDir,
@NotNull String currentRevision,
@NotNull String targetRevision,
@NotNull String committerName,
@NotNull String committerEmail) |
@NotNull HashAndSource |
obtainLatestRevision() |
Optional<GitHash> |
obtainLatestRevision(@NotNull File repositoryDirectory,
GitRef ref,
String path) |
void |
pushBranchOrTag(@NotNull File sourceDirectory,
@NotNull String refName) |
void |
pushRevision(@NotNull File sourceDirectory,
@NotNull String revision,
@Nullable String currentBranch) |
void |
stageChanges(@NotNull File sourceDirectory,
@NotNull Collection<String> pathsToAdd) |
void pushRevision(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String revision, @Nullable @Nullable String currentBranch) throws RepositoryException
RepositoryException
void pushBranchOrTag(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String refName) throws RepositoryException
RepositoryException
@NotNull default @NotNull String commit(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String message, @NotNull @NotNull String committerName, @NotNull @NotNull String committerEmail) throws RepositoryException
RepositoryException
@NotNull @NotNull String commit(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String message, @NotNull @NotNull String committerName, @NotNull @NotNull String committerEmail, boolean stageModifications) throws RepositoryException
RepositoryException
void stageChanges(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull Collection<String> pathsToAdd) throws RepositoryException
RepositoryException
@NotNull @NotNull String checkout(@Nullable @Nullable File cacheDirectory, @NotNull @NotNull File sourceDirectory, @NotNull @NotNull String targetRevision, @Nullable @Nullable String previousRevision) throws RepositoryException
RepositoryException
void fetch(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String targetRevision, boolean useShallow) throws RepositoryException
RepositoryException
void fetch(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String targetRevision, boolean useShallow, boolean fetchTagsByDefault) throws RepositoryException
RepositoryException
void fetch(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull HashAndSource refAndHash, boolean useShallow) throws RepositoryException
RepositoryException
void fetch(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull HashAndSource refAndHash, boolean useShallow, boolean fetchTagsByDefault) throws RepositoryException
RepositoryException
@NotNull @NotNull String getCurrentRevision(@NotNull @NotNull File sourceDirectory) throws RepositoryException
RepositoryException
List<TagAndRevision> getTagsForRepository(@NotNull @NotNull GitRepositoryAccessData accessData) throws RepositoryException
RepositoryException
boolean isClean(@NotNull @NotNull File sourceDirectory) throws RepositoryException
RepositoryException
@Nullable @Nullable String getShaOfRefIfExists(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String ref)
@NotNull @NotNull HashAndSource obtainLatestRevision() throws RepositoryException
RepositoryException
@NotNull @NotNull List<VcsBranch> getOpenBranches(@NotNull @NotNull GitRepositoryAccessData repositoryData, File workingDir) throws RepositoryException
RepositoryException
boolean checkRevisionExistsInCacheRepository(@NotNull @NotNull File repositoryDirectory, @NotNull @NotNull String targetRevision) throws IOException, RepositoryException
IOException
RepositoryException
@NotNull @NotNull CommitContext getCommit(File directory, String targetRevision) throws RepositoryException
RepositoryException
- if the revision can't be foundboolean merge(@NotNull @NotNull File workspaceDir, @NotNull @NotNull String targetRevision, @NotNull @NotNull String committerName, @NotNull @NotNull String committerEmail) throws RepositoryException
RepositoryException
Pair<Boolean,String> mergeAndReturnHead(@NotNull @NotNull File workspaceDir, @NotNull @NotNull String currentRevision, @NotNull @NotNull String targetRevision, @NotNull @NotNull String committerName, @NotNull @NotNull String committerEmail) throws RepositoryException
RepositoryException
BuildRepositoryChanges extractCommits(File cacheDirectory, @NotNull @NotNull String startingRevision, String endingRevision) throws RepositoryException
RepositoryException
@NotNull @NotNull Optional<String> getBranchForSha(@NotNull @NotNull File sourceDirectory, String revision, String configuredBranch) throws RepositoryException
RepositoryException
Optional<GitHash> obtainLatestRevision(@NotNull @NotNull File repositoryDirectory, GitRef ref, String path) throws RepositoryException
RepositoryException
boolean isAncestor(@NotNull @NotNull Path gitWorkspace, @NotNull @NotNull GitHash rev1, @NotNull @NotNull GitHash rev2) throws RepositoryException
RepositoryException
BuildRepositoryChanges extractCommits(File cacheDirectory, @NotNull @NotNull String startingRevision, String endingRevision, String path) throws RepositoryException
RepositoryException
BuildRepositoryChanges extractCommitsBetweenBranches(File cacheDirectory, VcsBranch otherBranch, boolean limitChangeList) throws RepositoryException
RepositoryException
void createBranch(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String branchName) throws RepositoryException
RepositoryException
void createLightweightTag(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String tagName, @NotNull @NotNull String revision) throws RepositoryException
RepositoryException
String getCurrentBranch(File checkoutPath) throws RepositoryException
RepositoryException
Copyright © 2024 Atlassian Software Systems Pty Ltd. All rights reserved.