Class LfsPrePushHook

  • All Implemented Interfaces:
    Callable<String>

    public class LfsPrePushHook
    extends PrePushHook
    Pre-push hook that handles uploading LFS artefacts.
    Since:
    4.11
    • Field Detail

      • outputStream

        protected final PrintStream outputStream
        The output stream to be used by the hook.
      • errorStream

        protected final PrintStream errorStream
        The error stream to be used by the hook.
    • Constructor Detail

      • LfsPrePushHook

        public LfsPrePushHook​(Repository repo,
                              PrintStream outputStream)
        Parameters:
        repo - the repository
        outputStream - not used by this implementation
      • LfsPrePushHook

        public LfsPrePushHook​(Repository repo,
                              PrintStream outputStream,
                              PrintStream errorStream)
        Parameters:
        repo - the repository
        outputStream - not used by this implementation
        errorStream - not used by this implementation
        Since:
        5.6
    • Method Detail

      • getRepository

        protected Repository getRepository()
        Get the repository
        Returns:
        The repository.
      • getOutputStream

        protected PrintStream getOutputStream()
        Get output stream
        Returns:
        The output stream the hook must use. Never null, System.out is returned by default.
      • getErrorStream

        protected PrintStream getErrorStream()
        Get error stream
        Returns:
        The error stream the hook must use. Never null, System.err is returned by default.
      • isNativeHookPresent

        public boolean isNativeHookPresent()
        Check whether a 'native' (i.e. script) hook is installed in the repository.
        Returns:
        whether a native hook script is installed in the repository.
        Since:
        4.11