Enum TagOpt

java.lang.Object
java.lang.Enum<TagOpt>
org.eclipse.jgit.transport.TagOpt
All Implemented Interfaces:
Serializable, Comparable<TagOpt>

public enum TagOpt extends Enum<TagOpt>
Specification of annotated tag behavior during fetch.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Automatically follow tags if we fetch the thing they point at.
    Always fetch tags, even if we do not have the thing it points at.
    Never fetch tags, even if we have the thing it points at.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static TagOpt
    Convert a command line/configuration file text into a value instance.
    Get the command line/configuration file text for this value.
    static TagOpt
    Returns the enum constant of this type with the specified name.
    static TagOpt[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AUTO_FOLLOW

      public static final TagOpt AUTO_FOLLOW
      Automatically follow tags if we fetch the thing they point at.

      This is the default behavior and tries to balance the benefit of having an annotated tag against the cost of possibly objects that are only on branches we care nothing about. Annotated tags are fetched only if we can prove that we already have (or will have when the fetch completes) the object the annotated tag peels (dereferences) to.

    • NO_TAGS

      public static final TagOpt NO_TAGS
      Never fetch tags, even if we have the thing it points at.

      This option must be requested by the user and always avoids fetching annotated tags. It is most useful if the location you are fetching from publishes annotated tags, but you are not interested in the tags and only want their branches.

    • FETCH_TAGS

      public static final TagOpt FETCH_TAGS
      Always fetch tags, even if we do not have the thing it points at.

      Unlike AUTO_FOLLOW the tag is always obtained. This may cause hundreds of megabytes of objects to be fetched if the receiving repository does not yet have the necessary dependencies.

  • Field Details

    • option

      private final String option
  • Constructor Details

    • TagOpt

      private TagOpt(String o)
  • Method Details

    • values

      public static TagOpt[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TagOpt valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • option

      public String option()
      Get the command line/configuration file text for this value.
      Returns:
      text that appears in the configuration file to activate this.
    • fromOption

      public static TagOpt fromOption(String o)
      Convert a command line/configuration file text into a value instance.
      Parameters:
      o - the configuration file text value.
      Returns:
      the option that matches the passed parameter.