Interface GitRevCoreBuilder<B extends GitRevCoreBuilder<B>>
- All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilderSupport<B>,GitCommandBuilderSupport<B>
- All Known Subinterfaces:
GitLogBuilder,GitRevListBuilder
public interface GitRevCoreBuilder<B extends GitRevCoreBuilder<B>>
extends GitCommandBuilderSupport<B>
Describes common
rev-list functionality, which is shared by log.- Since:
- 4.5
-
Field Summary
Fields inherited from interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
ENV_AUTHOR_DATE, ENV_AUTHOR_EMAIL, ENV_AUTHOR_NAME, ENV_COMMITTER_DATE, ENV_COMMITTER_EMAIL, ENV_COMMITTER_NAME -
Method Summary
Modifier and TypeMethodDescriptionall(boolean value) Controls use of--allboundary(boolean value) Controls use of--boundary.branches(boolean value) Controls use of--branchesClears anyfileswhich have been added, allowing the builder to be reused to construct multiple commands for traversals at different paths.Clears anyrevswhich have been added, allowing the builder to be reused to construct multiple commands for traversals over different commit ranges.ignoreMissing(boolean value) inputHandler(com.atlassian.bitbucket.scm.CommandInputHandler inputHandler) leftOnly(boolean value) Controls use of--left-only, which will return only commits reachable from the left-hand side of a symmetric range.leftRight(boolean value) Controls use of--left-right, which is used to mark which side of a symmetric range a given commit is reachable from.limit(int value) Specifies the max number of commits to output.merges(GitRevListMerges value) Specifies--merges,--no-mergesor--no-min-parents, to control whethergit rev-listshould include merge commits in its output.order(GitRevListOrder value) Specifies--date-orderor--topo-order, to control thegit rev-listcommit order.parents(boolean value) Controls use of--parentsAllows defining revisions to include and/or exclude using varargs-style syntax.Allows defining revisions to include and/or exclude using varargs-style syntax.rightOnly(boolean value) Controls use of--right-only, which will return only commits reachable from the right-hand side of a symmetric range.Show commits more recent than a specific date.skip(int value) Controls use of--skip.tags(boolean value) Controls use of--tagswalk(GitRevListWalk value) Specifies--no-walkor--do-walk, to control whethergit rev-listtraverses commit ancestry.Methods inherited from interface com.atlassian.bitbucket.scm.CommandBuilderSupport
clearEnvironment, defaultExitHandler, exitHandler, removeEnvironment, withEnvironmentMethods inherited from interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
alternate, alternates, alternates, author, author, author, build, commitish, committer, committer, committer, treeish, withConfiguration, withConfiguration, withConfiguration, withConfiguration
-
Method Details
-
all
Controls use of--all- Parameters:
value-trueto include all refs underrefs/to the rev-list- Returns:
this
-
boundary
Controls use of--boundary. When a range of commits is provided (whether symmetric or not), "boundary" commits are where the walk reaches the first excluded commit as it does its traversal. Even for a simple range like "master..feature-branch" (or "feature-branch ^master", written another way), multiple boundary commits may exist. Boundary commits are prefixed with a-, to differentiate them from reachable commits.- Parameters:
value-trueto output boundary commits, which are the first- Returns:
this- See Also:
-
branches
Controls use of--branches- Parameters:
value-trueto include all branches in the rev-list,falseotherwise- Returns:
this
-
clearFiles
Clears anyfileswhich have been added, allowing the builder to be reused to construct multiple commands for traversals at different paths.- Returns:
this
-
clearRevs
Clears anyrevswhich have been added, allowing the builder to be reused to construct multiple commands for traversals over different commit ranges.- Returns:
this
-
file
-
files
- Parameters:
values- a collection of file paths, within the repository, to limit returned commits- Returns:
this
-
files
- Parameters:
value- a file path, within the repository, to limit returned commitsvalues- additional file paths, within the repository, to limit returned commits- Returns:
this
-
format
-
ignoreMissing
-
inputHandler
-
leftOnly
Controls use of--left-only, which will return only commits reachable from the left-hand side of a symmetric range. When using--left-right, these would be the commits prefixed with a<.This setting is mutually exclusive with
--right-only. Setting one will overwrite the other.- Parameters:
value-trueto return only those commits reachable from the left-hand side of a symmetric range; otherwise,falseto return all commits- Returns:
this- See Also:
-
leftRight
Controls use of--left-right, which is used to mark which side of a symmetric range a given commit is reachable from. When enabled,git rev-listwill prefix commits with<if they are reachable from the left-hand side and with>if they are reachable from the right-hand side. When combined with--boundary, boundary commits are prefixed with-.Given two branches, A and B, providing "A...B" as the
revwill produce a symmetric range that can be used to show which commits are reachable from A but not B, and reachable from B but not A. It's the same as providing "A", "B", and "^(merge-base A B)".- Parameters:
value-trueto mark which side of a symmetric range each commit is reachable from; otherwise,falseto output matching commits from either side of the range normally- Returns:
this- See Also:
-
limit
Specifies the max number of commits to output.- Parameters:
value- the max number of commits- Returns:
this
-
merges
Specifies--merges,--no-mergesor--no-min-parents, to control whethergit rev-listshould include merge commits in its output.- Parameters:
value- the merge mode for the command- Returns:
this- Since:
- 4.8
-
order
Specifies--date-orderor--topo-order, to control thegit rev-listcommit order.- Parameters:
value- the order for the command- Returns:
this
-
parents
Controls use of--parents- Parameters:
value-trueto include all parents in the rev-list,falseotherwise- Returns:
this
-
rev
-
revs
Allows defining revisions to include and/or exclude using varargs-style syntax. Revisions can be specified using: ref names, fully qualified or short; SHA1s, full or short so long as they're unique; or using relative notations likeHEAD~5orHEAD^^^orHEAD@{2}. Revisions to exclude can be specified by prepending^, like^master.- Parameters:
values- a collection of revisions to include and/or exclude, to control returned commits- Returns:
this
-
revs
Allows defining revisions to include and/or exclude using varargs-style syntax. Revisions can be specified using: ref names, fully qualified or short; SHA1s, full or short so long as they're unique; or using relative notations likeHEAD~5orHEAD^^^orHEAD@{2}. Revisions to exclude can be specified by prepending^, like^master.- Parameters:
value- a revision to include or exclude, to control returned commitsvalues- additional revisions to include and/or exclude, to control returned commits- Returns:
this
-
rightOnly
Controls use of--right-only, which will return only commits reachable from the right-hand side of a symmetric range. When using--left-right, these would be the commits prefixed with a>.This setting is mutually exclusive with
--left-only. Setting one will overwrite the other.- Parameters:
value-trueto return only those commits reachable from the right-hand side of a symmetric range; otherwise,falseto return all commits- Returns:
this- See Also:
-
since
Show commits more recent than a specific date.- Parameters:
value- limits to commits newer than theInstantprovided- Returns:
this- Since:
- 7.12
-
skip
Controls use of--skip.- Parameters:
value- the number of commits to skip before starting to provide output- Returns:
this- Since:
- 7.12
-
tags
Controls use of--tags- Parameters:
value-trueto include all tags in the rev-list,falseotherwise- Returns:
this
-
walk
Specifies--no-walkor--do-walk, to control whethergit rev-listtraverses commit ancestry.Note: When using
--no-walk, excludes are not supported. This a limitation ofgit rev-list. If excludes are provided--no-walkis ignored.- Parameters:
value- the walk mode for the command- Returns:
this
-