diff options
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java index cc7a4357f5..8e3ec03c74 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java @@ -53,6 +53,7 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.TextProgressMonitor; import org.eclipse.jgit.transport.FetchResult; import org.eclipse.jgit.transport.RefSpec; +import org.eclipse.jgit.transport.TagOpt; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; @@ -86,6 +87,15 @@ class Fetch extends AbstractFetchCommand { @Option(name = "--quiet", usage = "usage_quiet") private Boolean quiet; + @Option(name = "--tags", usage="usage_tags", aliases = { "-t" }) + private Boolean tags; + + @Option(name = "--no-tags", usage = "usage_notags", aliases = { "-n" }) + void notags(@SuppressWarnings("unused") + final boolean ignored) { + tags = Boolean.FALSE; + } + @Argument(index = 0, metaVar = "metaVar_uriish") private String remote = Constants.DEFAULT_REMOTE_NAME; @@ -102,6 +112,10 @@ class Fetch extends AbstractFetchCommand { fetch.setRemoveDeletedRefs(prune.booleanValue()); if (toget != null) fetch.setRefSpecs(toget); + if (tags != null) { + fetch.setTagOpt(tags.booleanValue() ? TagOpt.FETCH_TAGS + : TagOpt.NO_TAGS); + } if (0 <= timeout) fetch.setTimeout(timeout); fetch.setDryRun(dryRun); |