Class ExternalId.Key

    • Constructor Detail

      • Key

        public Key()
    • Method Detail

      • create

        public static ExternalId.Key create​(String scheme,
                                            String id)
        Creates an external ID key.
        Parameters:
        scheme - the scheme name, must not contain colons (':'), can be null
        id - the external ID, must not contain colons (':')
        Returns:
        the created external ID key
      • parse

        public static ExternalId.Key parse​(String externalId)
        Parses an external ID key from a string in the format "scheme:id" or "id".
        Returns:
        the parsed external ID key
      • scheme

        public abstract String scheme()
      • id

        public abstract String id()
      • isScheme

        public boolean isScheme​(String scheme)
      • sha1

        public org.eclipse.jgit.lib.ObjectId sha1()
        Returns the SHA1 of the external ID that is used as note ID in the refs/meta/external-ids notes branch.
      • get

        public String get()
        Exports this external ID key as string with the format "scheme:id", or "id" if scheme is null.

        This string representation is used as subsection name in the Git config file that stores the external ID.