diff options
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java | 2 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java index 73530efca1..de430294fb 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java @@ -69,6 +69,7 @@ import org.eclipse.jgit.storage.file.FileRepository; 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 @@ class Clone extends AbstractFetchCommand { 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(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java index 54457e523d..0257f3264f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java @@ -66,6 +66,7 @@ import org.eclipse.jgit.transport.CredentialsProvider; 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 @@ public class CloneCommand implements Callable<Git> { 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(); |