From b274a824690839d39a40a8bc170cdd0dba8bee36 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 7 May 2020 10:47:33 +0900 Subject: [PATCH] ListGroups: Accept --ownedby as an alias of --owned-by In the release notes of 2.16 and documentation, the --owned-by option was incorrectly documented as --ownedBy which resulted in an error if it was used: "--ownedby" is not a valid option The documentation has been fixed, but --ownedBy will still result in an error for anyone who refers to the outdated documentation. Add --ownedby as an alias of --owned-by so that it will work if either is given. Bug: Issue 12698 Change-Id: I6229b191b59d8c0bc65105ae5817104c3b40863c --- java/com/google/gerrit/server/restapi/group/ListGroups.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/com/google/gerrit/server/restapi/group/ListGroups.java b/java/com/google/gerrit/server/restapi/group/ListGroups.java index 2567f6ab8c..7fe9e90106 100644 --- a/java/com/google/gerrit/server/restapi/group/ListGroups.java +++ b/java/com/google/gerrit/server/restapi/group/ListGroups.java @@ -205,7 +205,10 @@ public class ListGroups implements RestReadView { options.addAll(ListGroupsOption.fromBits(Integer.parseInt(hex, 16))); } - @Option(name = "--owned-by", usage = "list groups owned by the given group uuid") + @Option( + name = "--owned-by", + aliases = {"--ownedby"}, + usage = "list groups owned by the given group uuid") public void setOwnedBy(String ownedBy) { this.ownedBy = ownedBy; }