Change ls-project default type option from 'code' to 'all'

Listing project with type 'code' requires to open the project git
repository and type 'all' doesn't. Change the default type option to
'all' to prevent opening all git repositories every time ls-projects is
called without specifying the type option.

The main motivation for this change is to reduce load on Gerrit having
a lot of repositories and a lot of Jenkins Gerrit-Trigger connected to
it. Gerrit-Trigger uses the ls-projects command to build and keep up to
date its cache of Gerrit projects.

The only consequence of this change is that ls-projects users that
didn't specify the type option could now see more projects which should
not be an issue.

Change-Id: I747fdfae6825bbc9999c84b95a91dbefd7ade4bb
This commit is contained in:
Hugo Arès
2016-03-02 14:11:05 -05:00
parent 0522c52daf
commit 7e45a469fb
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ used to unescape the output.
--type::
Display only projects of the specified type. If not
specified, defaults to `code`. Supported types:
specified, defaults to `all`. Supported types:
+
--
`code`:: Any project likely to contain user files.

View File

@@ -181,7 +181,7 @@ public class ListProjects implements RestReadView<TopLevelResource> {
private final List<String> showBranch = Lists.newArrayList();
private boolean showTree;
private FilterType type = FilterType.CODE;
private FilterType type = FilterType.ALL;
private boolean showDescription;
private boolean all;
private int limit;