Interface GitArchiveBuilder

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

public interface GitArchiveBuilder extends GitCommandBuilderSupport<GitArchiveBuilder>
A builder which can be used to construct a command for running git archive.

git archive's -o and --output flags are intentionally not supported by this builder, to discourage storing generated archives on the server. Should there by an explicit need to store an archive, the caller can write a custom CommandOutputHandler to do so.

Since:
5.1
  • Method Details

    • clearPaths

      @Nonnull GitArchiveBuilder clearPaths()
      Clears any paths which have been applied to filter the files included in the archive.
      Returns:
      this
    • format

      @Nonnull GitArchiveBuilder format(@Nullable GitArchiveFormat value)
      Specifies the format for the generated archive. If no format is specified, the default for git archive will be used.
      Parameters:
      value - the desired format, or null to use the default
      Returns:
      this
    • path

      @Nonnull GitArchiveBuilder path(@Nullable String value)
      Specifies a path to filter the files included in the archive.
      Parameters:
      value - the filter path, which will be ignored if null
      Returns:
      this
    • paths

      @Nonnull GitArchiveBuilder paths(@Nullable String value, @Nullable String... values)
      Specifies one or more paths to filter the files included in the archive.
      Parameters:
      value - the first filter path, which will be ignored if null
      values - additional filter paths, which will be ignored if null
      Returns:
      this
    • paths

      @Nonnull GitArchiveBuilder paths(@Nullable Iterable<String> values)
      Specifies paths to filter the files included in the archive.
      Parameters:
      values - some number of filter paths, which will be ignored if null
      Returns:
      this
    • prefix

      @Nonnull GitArchiveBuilder prefix(@Nullable String value)
      Specifies a prefix to be applied to files included in the archive. By default, no prefix is applied.
      Parameters:
      value - the prefix to use, or null to not apply a prefix
      Returns:
      this
    • rev

      @Nonnull GitArchiveBuilder rev(@Nonnull String value)
      Specifies the revision which should be archived. If this method isn't called, HEAD will be used to archive the default branch for the repository.
      Parameters:
      value - the revision to archive
      Returns:
      this