Class PackRefsCommand

java.lang.Object
org.eclipse.jgit.api.GitCommand<String>
org.eclipse.jgit.api.PackRefsCommand
All Implemented Interfaces:
Callable<String>

public class PackRefsCommand extends GitCommand<String>
Optimize storage of references.
Since:
7.1
  • Constructor Details

    • PackRefsCommand

      public PackRefsCommand(Repository repo)
      Creates a new PackRefsCommand instance with default values.
      Parameters:
      repo - the repository this command will be used on
  • Method Details

    • setProgressMonitor

      public PackRefsCommand setProgressMonitor(ProgressMonitor monitor)
      Set progress monitor
      Parameters:
      monitor - a progress monitor
      Returns:
      this instance
    • setAll

      public PackRefsCommand setAll(boolean all)
      Specify whether to pack all the references.
      Parameters:
      all - if true all the loose refs will be packed
      Returns:
      this instance
    • isAll

      public boolean isAll()
      Whether to pack all the references
      Returns:
      whether to pack all the references
    • call

      public String call() throws GitAPIException
      Description copied from class: GitCommand

      Execute the command

      Specified by:
      call in interface Callable<String>
      Specified by:
      call in class GitCommand<String>
      Throws:
      GitAPIException