diff options
author | Colby Ranger <cranger@google.com> | 2013-08-05 15:12:57 -0700 |
---|---|---|
committer | Colby Ranger <cranger@google.com> | 2013-08-05 15:12:57 -0700 |
commit | ef7512b596e59785fe01a2513d49284c6ceb7587 (patch) | |
tree | 78748d492bd473d813c6b046340e433279cadbdc /org.eclipse.jgit.pgm | |
parent | 69761dbcdd38791151c4fdd76c05c366cc3f7a68 (diff) | |
download | jgit-ef7512b596e59785fe01a2513d49284c6ceb7587.tar.gz jgit-ef7512b596e59785fe01a2513d49284c6ceb7587.zip |
Add --quiet flag to pgm fetch.
Change-Id: If141fdc5c181b3a618b7e286ad3c6957211d0afc
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index 48b61edb03..2843c3be9a 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -266,6 +266,7 @@ usage_path=path usage_performFsckStyleChecksOnReceive=perform fsck style checks on receive usage_portNumberToListenOn=port number to listen on usage_pruneStaleTrackingRefs=prune stale tracking refs +usage_quiet=don't show progress messages usage_recordChangesToRepository=Record changes to the repository usage_recurseIntoSubtrees=recurse into subtrees usage_renameLimit=limit size of rename matrix 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()) |