Class FetchCommand

    • Constructor Detail

      • FetchCommand

        protected FetchCommand​(Repository repo)
        Parameters:
        repo -
    • Method Detail

      • setRemote

        public FetchCommand setRemote​(java.lang.String remote)
        The remote (uri or name) used for the fetch operation. If no remote is set, the default value of Constants.DEFAULT_REMOTE_NAME will be used.
        Parameters:
        remote -
        Returns:
        this
        See Also:
        Constants.DEFAULT_REMOTE_NAME
      • getRemote

        public java.lang.String getRemote()
        Returns:
        the remote used for the remote operation
      • getTimeout

        public int getTimeout()
        Returns:
        the timeout used for the fetch operation
      • isCheckFetchedObjects

        public boolean isCheckFetchedObjects()
        Returns:
        whether to check received objects checked for validity
      • setCheckFetchedObjects

        public FetchCommand setCheckFetchedObjects​(boolean checkFetchedObjects)
        If set to true, objects received will be checked for validity
        Parameters:
        checkFetchedObjects -
        Returns:
        this
      • isRemoveDeletedRefs

        public boolean isRemoveDeletedRefs()
        Returns:
        whether or not to remove refs which no longer exist in the source
      • setRemoveDeletedRefs

        public FetchCommand setRemoveDeletedRefs​(boolean removeDeletedRefs)
        If set to true, refs are removed which no longer exist in the source
        Parameters:
        removeDeletedRefs -
        Returns:
        this
      • getProgressMonitor

        public ProgressMonitor getProgressMonitor()
        Returns:
        the progress monitor for the fetch operation
      • setProgressMonitor

        public FetchCommand setProgressMonitor​(ProgressMonitor monitor)
        The progress monitor associated with the fetch operation. By default, this is set to NullProgressMonitor
        Parameters:
        monitor -
        Returns:
        this
        See Also:
        NullProgressMonitor
      • getRefSpecs

        public java.util.List<RefSpec> getRefSpecs()
        Returns:
        the ref specs
      • setRefSpecs

        public FetchCommand setRefSpecs​(RefSpec... specs)
        The ref specs to be used in the fetch operation
        Parameters:
        specs -
        Returns:
        this
      • setRefSpecs

        public FetchCommand setRefSpecs​(java.util.List<RefSpec> specs)
        The ref specs to be used in the fetch operation
        Parameters:
        specs -
        Returns:
        this
      • isDryRun

        public boolean isDryRun()
        Returns:
        the dry run preference for the fetch operation
      • setDryRun

        public FetchCommand setDryRun​(boolean dryRun)
        Sets whether the fetch operation should be a dry run
        Parameters:
        dryRun -
        Returns:
        this
      • isThin

        public boolean isThin()
        Returns:
        the thin-pack preference for fetch operation
      • setThin

        public FetchCommand setThin​(boolean thin)
        Sets the thin-pack preference for fetch operation. Default setting is Transport.DEFAULT_FETCH_THIN
        Parameters:
        thin -
        Returns:
        this
      • setTagOpt

        public FetchCommand setTagOpt​(TagOpt tagOpt)
        Sets the specification of annotated tag behavior during fetch
        Parameters:
        tagOpt -
        Returns:
        this