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
  • Method Details

    • all

      @Nonnull B all(boolean value)
      Controls use of --all
      Parameters:
      value - true to include all refs under refs/ to the rev-list
      Returns:
      this
    • boundary

      @Nonnull B boundary(boolean value)
      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 - true to output boundary commits, which are the first
      Returns:
      this
      See Also:
    • branches

      @Nonnull B branches(boolean value)
      Controls use of --branches
      Parameters:
      value - true to include all branches in the rev-list, false otherwise
      Returns:
      this
    • clearFiles

      @Nonnull B clearFiles()
      Clears any files which have been added, allowing the builder to be reused to construct multiple commands for traversals at different paths.
      Returns:
      this
    • clearRevs

      @Nonnull B clearRevs()
      Clears any revs which have been added, allowing the builder to be reused to construct multiple commands for traversals over different commit ranges.
      Returns:
      this
    • file

      @Nonnull B file(String value)
    • files

      @Nonnull B files(Iterable<String> values)
      Parameters:
      values - a collection of file paths, within the repository, to limit returned commits
      Returns:
      this
    • files

      @Nonnull B files(String value, String... values)
      Parameters:
      value - a file path, within the repository, to limit returned commits
      values - additional file paths, within the repository, to limit returned commits
      Returns:
      this
    • format

      @Nonnull B format(String value)
    • ignoreMissing

      @Nonnull B ignoreMissing(boolean value)
    • inputHandler

      @Nonnull B inputHandler(com.atlassian.bitbucket.scm.CommandInputHandler inputHandler)
    • leftOnly

      @Nonnull B leftOnly(boolean value)
      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 - true to return only those commits reachable from the left-hand side of a symmetric range; otherwise, false to return all commits
      Returns:
      this
      See Also:
    • leftRight

      @Nonnull B 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. When enabled, git rev-list will 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 rev will 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 - true to mark which side of a symmetric range each commit is reachable from; otherwise, false to output matching commits from either side of the range normally
      Returns:
      this
      See Also:
    • limit

      @Nonnull B limit(int value)
      Specifies the max number of commits to output.
      Parameters:
      value - the max number of commits
      Returns:
      this
    • merges

      @Nonnull B merges(@Nonnull GitRevListMerges value)
      Specifies --merges, --no-merges or --no-min-parents, to control whether git rev-list should include merge commits in its output.
      Parameters:
      value - the merge mode for the command
      Returns:
      this
      Since:
      4.8
    • order

      @Nonnull B order(@Nonnull GitRevListOrder value)
      Specifies --date-order or --topo-order, to control the git rev-list commit order.
      Parameters:
      value - the order for the command
      Returns:
      this
    • parents

      @Nonnull B parents(boolean value)
      Controls use of --parents
      Parameters:
      value - true to include all parents in the rev-list, false otherwise
      Returns:
      this
    • rev

      @Nonnull B rev(String value)
    • revs

      @Nonnull B revs(Iterable<String> values)
      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 like HEAD~5 or HEAD^^^ or HEAD@{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

      @Nonnull B revs(String value, String... values)
      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 like HEAD~5 or HEAD^^^ or HEAD@{2}. Revisions to exclude can be specified by prepending ^, like ^master.
      Parameters:
      value - a revision to include or exclude, to control returned commits
      values - additional revisions to include and/or exclude, to control returned commits
      Returns:
      this
    • rightOnly

      @Nonnull B rightOnly(boolean value)
      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 - true to return only those commits reachable from the right-hand side of a symmetric range; otherwise, false to return all commits
      Returns:
      this
      See Also:
    • since

      @Nonnull B since(@Nullable Instant value)
      Show commits more recent than a specific date.
      Parameters:
      value - limits to commits newer than the Instant provided
      Returns:
      this
      Since:
      7.12
    • skip

      @Nonnull B skip(int value)
      Controls use of --skip.
      Parameters:
      value - the number of commits to skip before starting to provide output
      Returns:
      this
      Since:
      7.12
    • tags

      @Nonnull B tags(boolean value)
      Controls use of --tags
      Parameters:
      value - true to include all tags in the rev-list, false otherwise
      Returns:
      this
    • walk

      @Nonnull B walk(@Nonnull GitRevListWalk value)
      Specifies --no-walk or --do-walk, to control whether git rev-list traverses commit ancestry.

      Note: When using --no-walk, excludes are not supported. This a limitation of git rev-list. If excludes are provided --no-walk is ignored.

      Parameters:
      value - the walk mode for the command
      Returns:
      this