Interface References


@Immutable public interface References
GitHub Git Data References.
Since:
0.8
See Also:
  • Method Details

    • repo

      Repo repo()
      Owner of them.
      Returns:
      Repo
    • create

      Reference create(String ref, String sha) throws IOException
      Creates a reference.
      Parameters:
      ref - The name of the fully qualified reference (ie: refs/heads/master).
      sha - The SHA1 value to set this reference to.
      Returns:
      Reference - The newly created Reference
      Throws:
      IOException - - If there are any errors.
    • get

      Reference get(String identifier)
      Get Reference by identifier.
      Parameters:
      identifier - Reference's name.
      Returns:
      Reference The reference with the given name
    • iterate

      Iterable<Reference> iterate()
      Iterates all references.
      Returns:
      Iterator of references.
    • iterate

      Iterable<Reference> iterate(String subnamespace)
      Iterates references in sub-namespace.
      Parameters:
      subnamespace - Sub-namespace
      Returns:
      Iterator of references.
    • tags

      Iterate references under "tags" sub-namespace.
      Returns:
      Iterator of references.
    • heads

      Iterate references under "heads" sub-namespace.
      Returns:
      Iterator of references.
    • remove

      void remove(String identifier) throws IOException
      Removes a reference by its identifier.
      Parameters:
      identifier - Reference's identifier.
      Throws:
      IOException - If there is any I/O problem.