Class HookUtil

java.lang.Object
com.google.gerrit.server.git.HookUtil

public class HookUtil extends Object
Static utilities for writing git protocol hooks.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Map<String,org.eclipse.jgit.lib.Ref>
    ensureAllRefsAdvertised(org.eclipse.jgit.transport.ReceivePack rp)
    Scan and advertise all refs in the repo if refs have not already been advertised; otherwise, just return the advertised map.
    static Map<String,org.eclipse.jgit.lib.Ref>
    ensureAllRefsAdvertised(org.eclipse.jgit.transport.UploadPack up)
    Scan and advertise all refs in the repo if refs have not already been advertised; otherwise, just return the advertised map.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • ensureAllRefsAdvertised

      public static Map<String,org.eclipse.jgit.lib.Ref> ensureAllRefsAdvertised(org.eclipse.jgit.transport.ReceivePack rp) throws org.eclipse.jgit.transport.ServiceMayNotContinueException
      Scan and advertise all refs in the repo if refs have not already been advertised; otherwise, just return the advertised map.
      Parameters:
      rp - receive-pack handler.
      Returns:
      map of refs that were advertised.
      Throws:
      org.eclipse.jgit.transport.ServiceMayNotContinueException - if a problem occurred.
    • ensureAllRefsAdvertised

      public static Map<String,org.eclipse.jgit.lib.Ref> ensureAllRefsAdvertised(org.eclipse.jgit.transport.UploadPack up) throws org.eclipse.jgit.transport.ServiceMayNotContinueException
      Scan and advertise all refs in the repo if refs have not already been advertised; otherwise, just return the advertised map.
      Parameters:
      up - upload-pack handler.
      Returns:
      map of refs that were advertised.
      Throws:
      org.eclipse.jgit.transport.ServiceMayNotContinueException - if a problem occurred.