Enum Ref.Storage

    • Enum Constant Detail

      • NEW

        public static final Ref.Storage NEW
        The ref does not exist yet, updating it may create it.

        Creation is likely to choose LOOSE storage.

      • LOOSE

        public static final Ref.Storage LOOSE
        The ref is stored in a file by itself.

        Updating this ref affects only this ref.

      • PACKED

        public static final Ref.Storage PACKED
        The ref is stored in the packed-refs file, with others.

        Updating this ref requires rewriting the file, with perhaps many other refs being included at the same time.

      • LOOSE_PACKED

        public static final Ref.Storage LOOSE_PACKED
        The ref is both LOOSE and PACKED.

        Updating this ref requires only updating the loose file, but deletion requires updating both the loose file and the packed refs file.

      • NETWORK

        public static final Ref.Storage NETWORK
        The ref came from a network advertisement and storage is unknown.

        This ref cannot be updated without Git-aware support on the remote side, as Git-aware code consolidate the remote refs and reported them to this process.

    • Method Detail

      • values

        public static Ref.Storage[] 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 (Ref.Storage c : Ref.Storage.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Ref.Storage 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
      • isLoose

        public boolean isLoose()
        Returns:
        true if this storage has a loose file.
      • isPacked

        public boolean isPacked()
        Returns:
        true if this storage is inside the packed file.