Interface GitLsTreeBuilder

All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilderSupport<GitLsTreeBuilder>, GitCommandBuilderSupport<GitLsTreeBuilder>

public interface GitLsTreeBuilder extends GitCommandBuilderSupport<GitLsTreeBuilder>
A type-safe, argument-safe builder for git ls-tree.
  • Method Details

    • clearPaths

      @Nonnull GitLsTreeBuilder clearPaths()
      reset the paths provided to empty
      Returns:
      this
      Since:
      4.13
    • nullTerminated

      @Nonnull GitLsTreeBuilder nullTerminated(boolean value)
      Parameters:
      value - true to pass -z to git ls-tree; otherwise, false
      Returns:
      this
      Since:
      4.2
    • path

      @Nonnull GitLsTreeBuilder path(@Nullable String path)
      Offers a way to filter the subtree passed in via tree(String, String) to zero to many paths by matching the name of the node in the tree. For example,
      
           .tree("master", "src/main/java")
           .path("javafile.java")
       
      will ensure that from the "src/main/java" tree, only the file "javafile.java" is selected.

      This is not exclusive to files, and the path can be for a file, directory, or submodule.

      Parameters:
      path - a node on the tree passed to tree(String, String)
      Returns:
      this
      Since:
      4.13
    • paths

      @Nonnull GitLsTreeBuilder paths(@Nullable String value, @Nullable String... values)
      Parameters:
      value - value
      values - values
      Returns:
      this
      Since:
      4.13
      See Also:
    • paths

      @Nonnull GitLsTreeBuilder paths(@Nullable Iterable<String> values)
      Parameters:
      values - path iterable
      Returns:
      this
      Since:
      4.13
      See Also:
    • recursive

      @Nonnull GitLsTreeBuilder recursive(boolean value)
      Parameters:
      value - true to pass -r to git ls-tree; otherwise, false
      Returns:
      this
    • sizes

      @Nonnull GitLsTreeBuilder sizes(boolean value)
      Parameters:
      value - true to pass -l to git ls-tree; otherwise, false
      Returns:
      this
      Since:
      4.2
    • tree

      @Nonnull GitLsTreeBuilder tree(@Nonnull String value)
      Parameters:
      value - the tree-ish (typically a commit or tree by ref name or SHA-1) to pass to git ls-tree
      Returns:
      this
    • tree

      @Nonnull GitLsTreeBuilder tree(@Nonnull String rev, @Nullable String file)
      Offers a convenient shorthand for identifying a subtree in a given commit. For example, passing ("master", "src/main/java") will output the contents of the src/main/java tree on the "master" branch. Note that passing "master:src/main/java" to tree(String) would produce the same output.
      Parameters:
      rev - the commit to display the tree at, identified by ref name or SHA-1
      file - the path of the tree to display, which may be "" to display the root tree
      Returns:
      this