Browse Source

Add --quiet flag to pgm fetch.

Change-Id: If141fdc5c181b3a618b7e286ad3c6957211d0afc
stable-3.1
Colby Ranger 11 years ago
parent
commit
ef7512b596
  1. 1
      org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
  2. 6
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java

1
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_performFsckStyleChecksOnReceive=perform fsck style checks on receive
usage_portNumberToListenOn=port number to listen on usage_portNumberToListenOn=port number to listen on
usage_pruneStaleTrackingRefs=prune stale tracking refs usage_pruneStaleTrackingRefs=prune stale tracking refs
usage_quiet=don't show progress messages
usage_recordChangesToRepository=Record changes to the repository usage_recordChangesToRepository=Record changes to the repository
usage_recurseIntoSubtrees=recurse into subtrees usage_recurseIntoSubtrees=recurse into subtrees
usage_renameLimit=limit size of rename matrix usage_renameLimit=limit size of rename matrix

6
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java

@ -83,6 +83,9 @@ class Fetch extends AbstractFetchCommand {
thin = Boolean.FALSE; thin = Boolean.FALSE;
} }
@Option(name = "--quiet", usage = "usage_quiet")
private Boolean quiet;
@Argument(index = 0, metaVar = "metaVar_uriish") @Argument(index = 0, metaVar = "metaVar_uriish")
private String remote = Constants.DEFAULT_REMOTE_NAME; private String remote = Constants.DEFAULT_REMOTE_NAME;
@ -105,7 +108,8 @@ class Fetch extends AbstractFetchCommand {
fetch.setRemote(remote); fetch.setRemote(remote);
if (thin != null) if (thin != null)
fetch.setThin(thin.booleanValue()); fetch.setThin(thin.booleanValue());
fetch.setProgressMonitor(new TextProgressMonitor()); if (quiet == null || !quiet.booleanValue())
fetch.setProgressMonitor(new TextProgressMonitor());
FetchResult result = fetch.call(); FetchResult result = fetch.call();
if (result.getTrackingRefUpdates().isEmpty()) if (result.getTrackingRefUpdates().isEmpty())

Loading…
Cancel
Save