/** * Sets the specification of annotated tag behavior during fetch * * @param tagOpt * the {@link org.eclipse.jgit.transport.TagOpt} * @return {@code this} */ public FetchCommand setTagOpt(TagOpt tagOpt) { checkCallable(); this.tagOption = tagOpt; return this; }
/** * Sets whether the fetch operation should be a dry run * * @param dryRun * whether to do a dry run * @return {@code this} */ public FetchCommand setDryRun(boolean dryRun) { checkCallable(); this.dryRun = dryRun; return this; }
/** * Sets the thin-pack preference for fetch operation. * * Default setting is Transport.DEFAULT_FETCH_THIN * * @param thin * the thin-pack preference * @return {@code this} */ public FetchCommand setThin(boolean thin) { checkCallable(); this.thin = thin; return this; }
/** * If set to {@code true}, objects received will be checked for validity * * @param checkFetchedObjects * whether to check objects for validity * @return {@code this} */ public FetchCommand setCheckFetchedObjects(boolean checkFetchedObjects) { checkCallable(); this.checkFetchedObjects = checkFetchedObjects; return this; }
/** * The remote (uri or name) used for the fetch operation. If no remote is * set, the default value of <code>Constants.DEFAULT_REMOTE_NAME</code> will * be used. * * @see Constants#DEFAULT_REMOTE_NAME * @param remote * name of a remote * @return {@code this} */ public FetchCommand setRemote(String remote) { checkCallable(); this.remote = remote; return this; }
/** * The progress monitor associated with the fetch operation. By default, * this is set to <code>NullProgressMonitor</code> * * @see NullProgressMonitor * @param monitor * a {@link org.eclipse.jgit.lib.ProgressMonitor} * @return {@code this} */ public FetchCommand setProgressMonitor(ProgressMonitor monitor) { checkCallable(); if (monitor == null) { monitor = NullProgressMonitor.INSTANCE; } this.monitor = monitor; return this; }
/** * If set to {@code true}, refs are removed which no longer exist in the * source * * @param removeDeletedRefs * whether to remove deleted {@code Ref}s * @return {@code this} */ public FetchCommand setRemoveDeletedRefs(boolean removeDeletedRefs) { checkCallable(); this.removeDeletedRefs = Boolean.valueOf(removeDeletedRefs); return this; }
/** * The ref specs to be used in the fetch operation * * @param specs * list of {@link org.eclipse.jgit.transport.RefSpec}s * @return {@code this} */ public FetchCommand setRefSpecs(List<RefSpec> specs) { checkCallable(); this.refSpecs.clear(); this.refSpecs.addAll(specs); return this; }
/** * Set the mode to be used for recursing into submodules. * * @param recurse * corresponds to the * --recurse-submodules/--no-recurse-submodules options. If * {@code null} use the value of the * {@code submodule.name.fetchRecurseSubmodules} option * configured per submodule. If not specified there, use the * value of the {@code fetch.recurseSubmodules} option configured * in git config. If not configured in either, "on-demand" is the * built-in default. * @return {@code this} * @since 4.7 */ public FetchCommand setRecurseSubmodules( @Nullable FetchRecurseSubmodulesMode recurse) { checkCallable(); submoduleRecurseMode = recurse; return this; }
/** * If set to true, objects received will be checked for validity * * @param checkFetchedObjects * @return {@code this} */ public FetchCommand setCheckFetchedObjects(boolean checkFetchedObjects) { checkCallable(); this.checkFetchedObjects = checkFetchedObjects; return this; }
/** * Sets whether the fetch operation should be a dry run * * @param dryRun * whether to do a dry run * @return {@code this} */ public FetchCommand setDryRun(boolean dryRun) { checkCallable(); this.dryRun = dryRun; return this; }
/** * If set to {@code true}, objects received will be checked for validity * * @param checkFetchedObjects * whether to check objects for validity * @return {@code this} */ public FetchCommand setCheckFetchedObjects(boolean checkFetchedObjects) { checkCallable(); this.checkFetchedObjects = checkFetchedObjects; return this; }
/** * Sets the specification of annotated tag behavior during fetch * * @param tagOpt * the {@link org.eclipse.jgit.transport.TagOpt} * @return {@code this} */ public FetchCommand setTagOpt(TagOpt tagOpt) { checkCallable(); this.tagOption = tagOpt; return this; }
/** * Sets the specification of annotated tag behavior during fetch * * @param tagOpt * @return {@code this} */ public FetchCommand setTagOpt(TagOpt tagOpt) { checkCallable(); this.tagOption = tagOpt; return this; } }
/** * Sets whether the fetch operation should be a dry run * * @param dryRun * @return {@code this} */ public FetchCommand setDryRun(boolean dryRun) { checkCallable(); this.dryRun = dryRun; return this; }
/** * Sets the thin-pack preference for fetch operation. * * Default setting is Transport.DEFAULT_FETCH_THIN * * @param thin * the thin-pack preference * @return {@code this} */ public FetchCommand setThin(boolean thin) { checkCallable(); this.thin = thin; return this; }
/** * If set to true, refs are removed which no longer exist in the source * * @param removeDeletedRefs * @return {@code this} */ public FetchCommand setRemoveDeletedRefs(boolean removeDeletedRefs) { checkCallable(); this.removeDeletedRefs = Boolean.valueOf(removeDeletedRefs); return this; }
/** * The ref specs to be used in the fetch operation * * @param specs * @return {@code this} */ public FetchCommand setRefSpecs(List<RefSpec> specs) { checkCallable(); this.refSpecs.clear(); this.refSpecs.addAll(specs); return this; }
/** * The ref specs to be used in the fetch operation * * @param specs * @return {@code this} */ public FetchCommand setRefSpecs(RefSpec... specs) { checkCallable(); this.refSpecs.clear(); for (RefSpec spec : specs) refSpecs.add(spec); return this; }
public FetchResult call() throws GitAPIException, InvalidRemoteException, org.eclipse.jgit.api.errors.TransportException { checkCallable();