import org.eclipse.jgit.transport.CredentialsProvider;
import org.eclipse.jgit.transport.FetchResult;
import org.eclipse.jgit.transport.RefSpec;
+import org.eclipse.jgit.transport.TagOpt;
import org.eclipse.jgit.transport.Transport;
/**
private CredentialsProvider credentialsProvider;
+ private TagOpt tagOption;
/**
* @param repo
transport.setRemoveDeletedRefs(removeDeletedRefs);
transport.setTimeout(timeout);
transport.setDryRun(dryRun);
+ if (tagOption != null)
+ transport.setTagOpt(tagOption);
transport.setFetchThin(thin);
transport.setCredentialsProvider(credentialsProvider);
this.credentialsProvider = credentialsProvider;
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;
+ }
}