Add allowEmpty to CherryPickInput
Currently, when creating a cherry-pick, ignoreIdenticalTree will be set
to false, thus cherry-picks that would create an empty commit fail
instead of creating the commit. AllowEmpty sets ignoreIdenticalTree.
This change adds the ability to also set this parameter when creating a
cherry-pick.
This is useful especially when implementing Cherry-pick topic, since
when cherry-picking a topic we want to either succeed with the whole
topic, or fail with the whole topic. It makes it much simpler to just
succeed with the whole topic by setting this parameter to true. If
allowEmpty is set to false, and we cherry-pick a topic, it's
very likely that some changes fail and the user will be confused as to
what happened. Creating an empty change will clarify the situation to
the user.
Change-Id: I9b5b1510b9182f5a039fd8e938eddb3a39ecb754
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index fc304ba..dd55517 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -6185,6 +6185,10 @@
the created change will have no topic.
If the change already exists, the topic will not change if not set. If set, the
topic will be overridden.
+|`allow_empty` |optional, defaults to false|
+If `true`, the cherry-pick succeeds also if the created commit will be empty.
+If `false`, a cherry-pick that would create an empty commit fails without creating
+the commit.
|===========================
[[comment-info]]