Merge branch 'stable-2.8' * stable-2.8: Always show repo download command if repo download scheme is enabled Conflicts: src/main/java/com/googlesource/gerrit/plugins/download/command/RepoCommand.java Change-Id: I8115a26a7959cc7766b1ff61f15b211f9a59bd35
diff --git a/src/main/java/com/googlesource/gerrit/plugins/download/command/RepoCommand.java b/src/main/java/com/googlesource/gerrit/plugins/download/command/RepoCommand.java index 6145d98..7f11bed 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/download/command/RepoCommand.java +++ b/src/main/java/com/googlesource/gerrit/plugins/download/command/RepoCommand.java
@@ -14,8 +14,6 @@ package com.googlesource.gerrit.plugins.download.command; -import static com.google.gerrit.reviewdb.client.AccountGeneralPreferences.DownloadCommand.REPO_DOWNLOAD; - import com.google.gerrit.extensions.config.DownloadCommand; import com.google.gerrit.extensions.config.DownloadScheme; import com.google.gerrit.server.config.DownloadConfig; @@ -23,17 +21,15 @@ import com.googlesource.gerrit.plugins.download.scheme.RepoScheme; -class RepoCommand extends DownloadCommand { - private final boolean commandAllowed; +public class RepoCommand extends DownloadCommand { @Inject RepoCommand(DownloadConfig downloadConfig) { - this.commandAllowed = downloadConfig.getDownloadCommands().contains(REPO_DOWNLOAD); } @Override 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;