From ef7512b596e59785fe01a2513d49284c6ceb7587 Mon Sep 17 00:00:00 2001 From: Colby Ranger Date: Mon, 5 Aug 2013 15:12:57 -0700 Subject: Add --quiet flag to pgm fetch. Change-Id: If141fdc5c181b3a618b7e286ad3c6957211d0afc --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit.pgm/src/org') 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 beb6e31643..cc7a4357f5 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 @@ -83,6 +83,9 @@ class Fetch extends AbstractFetchCommand { thin = Boolean.FALSE; } + @Option(name = "--quiet", usage = "usage_quiet") + private Boolean quiet; + @Argument(index = 0, metaVar = "metaVar_uriish") private String remote = Constants.DEFAULT_REMOTE_NAME; @@ -105,7 +108,8 @@ class Fetch extends AbstractFetchCommand { fetch.setRemote(remote); if (thin != null) fetch.setThin(thin.booleanValue()); - fetch.setProgressMonitor(new TextProgressMonitor()); + if (quiet == null || !quiet.booleanValue()) + fetch.setProgressMonitor(new TextProgressMonitor()); FetchResult result = fetch.call(); if (result.getTrackingRefUpdates().isEmpty()) -- cgit v1.2.3