Merge "Always fetch tags during clone"
This commit is contained in:
commit
b4b5178e82
|
@ -69,6 +69,7 @@
|
|||
import org.eclipse.jgit.transport.FetchResult;
|
||||
import org.eclipse.jgit.transport.RefSpec;
|
||||
import org.eclipse.jgit.transport.RemoteConfig;
|
||||
import org.eclipse.jgit.transport.TagOpt;
|
||||
import org.eclipse.jgit.transport.Transport;
|
||||
import org.eclipse.jgit.transport.URIish;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
@ -143,6 +144,7 @@ private FetchResult runFetch() throws NotSupportedException,
|
|||
final Transport tn = Transport.open(db, remoteName);
|
||||
final FetchResult r;
|
||||
try {
|
||||
tn.setTagOpt(TagOpt.FETCH_TAGS);
|
||||
r = tn.fetch(new TextProgressMonitor(), null);
|
||||
} finally {
|
||||
tn.close();
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
import org.eclipse.jgit.transport.FetchResult;
|
||||
import org.eclipse.jgit.transport.RefSpec;
|
||||
import org.eclipse.jgit.transport.RemoteConfig;
|
||||
import org.eclipse.jgit.transport.TagOpt;
|
||||
import org.eclipse.jgit.transport.URIish;
|
||||
|
||||
/**
|
||||
|
@ -149,6 +150,7 @@ private FetchResult fetch(Repository repo, URIish u)
|
|||
FetchCommand command = new FetchCommand(repo);
|
||||
command.setRemote(remote);
|
||||
command.setProgressMonitor(monitor);
|
||||
command.setTagOpt(TagOpt.FETCH_TAGS);
|
||||
if (credentialsProvider != null)
|
||||
command.setCredentialsProvider(credentialsProvider);
|
||||
return command.call();
|
||||
|
|
Loading…
Reference in New Issue