summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java6
1 files changed, 6 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 bc76372862..61fd521b80 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
@@ -100,6 +100,9 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback {
tags = Boolean.FALSE;
}
+ @Option(name = "--force", usage = "usage_forcedFetch", aliases = { "-f" })
+ private Boolean force;
+
private FetchRecurseSubmodulesMode recurseSubmodules;
@Option(name = "--recurse-submodules", usage = "usage_recurseSubmodules")
@@ -155,6 +158,9 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback {
if (quiet == null || !quiet.booleanValue())
fetch.setProgressMonitor(new TextProgressMonitor(errw));
fetch.setRecurseSubmodules(recurseSubmodules).setCallback(this);
+ if (force != null) {
+ fetch.setForceUpdate(force.booleanValue());
+ }
FetchResult result = fetch.call();
if (result.getTrackingRefUpdates().isEmpty()