Enum TagOpt

    • Enum Constant Detail

      • 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.

    • Method Detail

      • values

        public static TagOpt[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TagOpt c : TagOpt.values())
            System.out.println(c);
        
        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.