public interface GitLsTreeBuilder extends GitCommandBuilderSupport<GitLsTreeBuilder>
git ls-tree
.ENV_AUTHOR_DATE, ENV_AUTHOR_EMAIL, ENV_AUTHOR_NAME, ENV_COMMITTER_DATE, ENV_COMMITTER_EMAIL, ENV_COMMITTER_NAME
Modifier and Type | Method and Description |
---|---|
GitLsTreeBuilder |
clearPaths()
reset the paths provided to empty
|
GitLsTreeBuilder |
nullTerminated(boolean value) |
GitLsTreeBuilder |
path(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. |
GitLsTreeBuilder |
paths(Iterable<String> values) |
GitLsTreeBuilder |
paths(String value,
String... values) |
GitLsTreeBuilder |
recursive(boolean value) |
GitLsTreeBuilder |
sizes(boolean value) |
GitLsTreeBuilder |
tree(String value) |
GitLsTreeBuilder |
tree(String rev,
String file)
Offers a convenient shorthand for identifying a subtree in a given commit.
|
alternate, alternates, alternates, author, author, author, build, committer, committer, committer, withConfiguration, withConfiguration, withConfiguration, withConfiguration
@Nonnull GitLsTreeBuilder clearPaths()
this
@Nonnull GitLsTreeBuilder nullTerminated(boolean value)
value
- true
to pass -z
to git ls-tree
; otherwise, false
this
@Nonnull GitLsTreeBuilder path(@Nullable String path)
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.
path
- a node on the tree passed to tree(String, String)
this
@Nonnull GitLsTreeBuilder paths(@Nullable String value, @Nullable String... values)
value
- valuevalues
- valuesthis
path(String)
@Nonnull GitLsTreeBuilder paths(@Nullable Iterable<String> values)
values
- path iterablethis
path(String)
@Nonnull GitLsTreeBuilder recursive(boolean value)
value
- true
to pass -r
to git ls-tree
; otherwise, false
this
@Nonnull GitLsTreeBuilder sizes(boolean value)
value
- true
to pass -l
to git ls-tree
; otherwise, false
this
@Nonnull GitLsTreeBuilder tree(@Nonnull String value)
value
- the tree-ish
(typically a commit
or tree
by ref name or SHA-1)
to pass to git ls-tree
this
@Nonnull GitLsTreeBuilder tree(@Nonnull String rev, @Nullable String file)
("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.rev
- the commit to display the tree at, identified by ref name or SHA-1file
- the path of the tree to display, which may be ""
to display the root treethis
Copyright © 2019 Atlassian. All rights reserved.