import org.eclipse.jgit.lib.RepositoryState;
import org.eclipse.jgit.merge.MergeStrategy;
import org.eclipse.jgit.transport.FetchResult;
+import org.eclipse.jgit.transport.TagOpt;
/**
* The Pull command
private MergeStrategy strategy = MergeStrategy.RECURSIVE;
+ private TagOpt tagOption;
+
/**
* @param repo
*/
JGitText.get().operationCanceled,
JGitText.get().pullTaskName));
- FetchCommand fetch = new FetchCommand(repo);
- fetch.setRemote(remote);
- fetch.setProgressMonitor(monitor);
+ FetchCommand fetch = new FetchCommand(repo).setRemote(remote)
+ .setProgressMonitor(monitor).setTagOpt(tagOption);
configure(fetch);
fetchRes = fetch.call();
return this;
}
+ /**
+ * Sets the specification of annotated tag behavior during fetch
+ *
+ * @param tagOpt
+ * @return {@code this}
+ * @Since 4.7
+ */
+ public PullCommand setTagOpt(TagOpt tagOpt) {
+ checkCallable();
+ this.tagOption = tagOpt;
+ return this;
+ }
+
/**
* Reads the rebase mode to use for a pull command from the repository
* configuration. This is the value defined for the configurations