Always show repo download command if repo download scheme is enabled

At the moment the repo download command is only shown in the repo
download scheme if it is explicitly enabled in the gerrit.config by
setting download.command = repo_download. Since the repo download
command is the only command that makes sense for the repo download
scheme it should always be displayed when the repo download scheme is
enabled. It doesn't make sense to be able to enable the repo download
scheme and to disable the repo download command at the same time.

Change-Id: I79758f81c43b43c52dc6ecd116b7cda66f02374b
Signed-off-by: Edwin Kempin <>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/download/command/ b/src/main/java/com/googlesource/gerrit/plugins/download/command/
index 2edfac3..7f11bed 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/download/command/
+++ b/src/main/java/com/googlesource/gerrit/plugins/download/command/
@@ -14,8 +14,6 @@
-import static;
@@ -24,16 +22,14 @@
 public class RepoCommand extends DownloadCommand {
-  private final boolean commandAllowed;
   RepoCommand(DownloadConfig downloadConfig) {
-    this.commandAllowed = downloadConfig.getDownloadCommands().contains(REPO_DOWNLOAD);
   public String getCommand(DownloadScheme scheme, String project, String ref) {
-    if (commandAllowed && scheme instanceof RepoScheme) {
+    if (scheme instanceof RepoScheme) {
       String id = trim(ref);
       if (id != null) {
         return "repo download " + scheme.getUrl(project) + " " + id;