gerrit/Documentation
David Pursehouse 38cb32d7b7 CreateChange: Strip comment lines out of input commit message
Attempting to create a change with only a commit message subject where
the subject begins with a # fails due to an invalid (zeros) Change-Id.

The zero Change-Id is appended to the change because the JGit utility
method used to generate it strips the commit message of any comment
lines, which in this case results in an empty commit message, and then
the commit message does not have enough content.

Strip comment lines out of the input commit message before attempting
to use it to create the change. If it is empty after stripping the
comments, return 400 Bad Request.

Update the 'ChangeInput' documentation to mention that comment lines
will be stripped. Also change the description to reflect the fact that
the `subject` field is actually used for the entire commit message,
rather than only the subject.

Bug: Issue 9195
Change-Id: I5a2eed97aeb187801550f3a6b35e3dcfd2baf34e
2018-06-07 16:08:38 +09:00
..
images Use buck rule for ReleaseNotes instead of Makefile 2016-05-17 23:23:31 +00:00
.gitignore Ignore /Documentation/*.html 2015-05-06 11:25:51 -07:00
access-control.txt For deleting a branch, the "Delete Reference" permission is sufficient. 2017-10-19 22:38:06 +02:00
BUILD Format BUILD and WORKSPACE files with buildifier 2017-02-28 17:32:44 +09:00
cmd-apropos.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-ban-commit.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-cherry-pick.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-close-connection.txt Fix broken synopsis formatting in documentation 2016-07-06 10:54:42 +02:00
cmd-create-account.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-create-branch.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-create-group.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-create-project.txt Align SSH create-project with REST API 2018-03-10 01:01:35 +00:00
cmd-flush-caches.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-gc.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-gsql.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-hook-commit-msg.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-index-activate.txt doc: fix the example of index activate command 2018-04-16 20:33:30 -04:00
cmd-index-changes.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-index-project.txt Allow to index all changes of a project 2017-02-24 11:10:22 +00:00
cmd-index-start.txt Mention groups index in documentation of index start command 2018-03-27 19:46:52 +01:00
cmd-index.txt Merge branch 'stable-2.13' into stable-2.14 2017-04-14 08:45:12 +09:00
cmd-kill.txt Fix broken synopsis formatting in documentation 2016-07-06 10:54:42 +02:00
cmd-logging-ls-level.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-logging-set-level.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-ls-groups.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-ls-members.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-ls-projects.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-ls-user-refs.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-plugin-enable.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-plugin-install.txt Fix various typos, spelling mistakes, and inconsistencies 2016-09-06 16:27:49 +09:00
cmd-plugin-ls.txt Fix broken synopsis formatting in documentation 2016-07-06 10:54:42 +02:00
cmd-plugin-reload.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-plugin-remove.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-query.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-receive-pack.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-rename-group.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-review.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-set-account.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-set-head.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-set-members.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
cmd-set-project-parent.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-set-project.txt Documentation: add REBASE_ALWAYS as submit type option where omitted 2017-08-27 23:37:33 +00:00
cmd-set-reviewers.txt Fix changes not found 2017-10-18 21:55:15 -04:00
cmd-show-caches.txt Fix some legacy-style titles in documentation 2016-07-08 13:45:28 +02:00
cmd-show-connections.txt ShowConnections: Only show start and idle columns for mina backend 2016-08-04 05:55:37 +00:00
cmd-show-queue.txt doc update: how to get online index status info 2016-08-15 13:57:37 -07:00
cmd-stream-events.txt ReviewerDeletedEvent: Include user that removed the reviewer 2017-07-20 10:58:00 +09:00
cmd-suexec.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-test-submit-rule.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-test-submit-type.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
cmd-version.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
config-auto-site-initialization.txt Update Documentation of Auto Site Initialization 2017-03-01 08:18:24 +09:00
config-cla.txt config-cla: Improve documentation of adding groups config 2016-08-22 17:46:31 +09:00
config-gerrit.txt Minor cleanup in the Elasticsearch configuration documentation 2018-05-10 15:40:47 +09:00
config-gitweb.txt Document that gitweb.type must be set 2018-03-16 09:47:32 +09:00
config-hooks.txt Move hooks from core Gerrit to 'hooks' plugin 2016-07-04 11:06:18 +09:00
config-labels.txt Fix copyAllScoresOnMergeFirstParentUpdate's documentation 2018-05-26 14:15:54 +09:00
config-login-register.txt Remove footer blocks from included documentation pages 2017-01-11 01:20:24 +00:00
config-mail.txt config-mail: Remove redundant colons from section titles 2018-05-01 15:45:39 +09:00
config-plugins.txt Add analytics to the list of plugins 2018-03-01 08:40:29 +00:00
config-project-config.txt Document commentlink section in project.config file 2016-10-13 09:00:55 +02:00
config-reverseproxy.txt Update reverse proxy configuration example for nginx 2015-07-06 01:50:38 +00:00
config-robot-comments.txt Add support for Robot Comments 2016-09-28 15:34:54 +02:00
config-sso.txt config-sso: Reword section about Google OpenID shutdown 2018-02-02 10:21:17 +09:00
config-themes.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
config-validation.txt Fix various typos in documentation 2017-03-03 15:54:53 +09:00
database-setup.txt Doc: Set default character set for MySQL 2017-10-03 16:01:49 +03:00
dev-bazel.txt dev-bazel: Improve documentation of build caches 2018-06-05 15:53:10 +09:00
dev-build-plugins.txt Expand docs on how to include external dependencies in core plugins 2018-02-27 17:06:26 +09:00
dev-contributing.txt dev-contributing: Update link to buildifier tool 2018-06-04 23:22:01 +09:00
dev-design.txt Replace links to code.google.com/p/gerrit 2018-02-02 10:13:45 +09:00
dev-eclipse.txt google-java-formatter: Document how to set up Eclipse plugin 2017-02-10 09:30:48 +00:00
dev-inspector.txt Merge "Some more broken synopsis formattings in documentation" 2016-07-08 14:07:44 +00:00
dev-intellij.txt Documentation: clarify latest IntelliJ version use 2018-05-28 23:03:19 +00:00
dev-note-db.txt Update dev-note-db.txt to reflect reality 2017-03-21 14:29:25 -07:00
dev-plugins.txt Add documentation for SshCreateCommandInterceptor 2018-03-01 08:30:41 +09:00
dev-readme.txt Replace links to code.google.com/p/gerrit 2018-02-02 10:13:45 +09:00
dev-release-deploy-config.txt Update documentation of how to configure Maven for Google Storage 2016-09-21 07:36:26 +02:00
dev-release-jgit.txt Provide a diff file to make it easier to deploy JGit snapshot 2016-08-31 11:13:47 +09:00
dev-release-subproject.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
dev-release.txt Remove Buck based build 2017-01-23 12:44:58 +00:00
dev-rest-api.txt gerrit-server: use hashed passwords for HTTP. 2017-02-28 09:09:33 +01:00
dev-stars.txt Update documentation of ignore star 2017-03-10 10:52:04 +01:00
error-branch-not-found.txt Doc: Consistently refer to "Web UI" rather than "WebUI" 2014-05-02 17:21:22 +09:00
error-change-closed.txt Doc: Consistently refer to "Web UI" rather than "WebUI" 2014-05-02 17:21:22 +09:00
error-change-does-not-belong-to-project.txt Consistently refer to Change-Id in documentation 2014-09-04 13:12:24 +09:00
error-change-not-found.txt Consistently refer to Change-Id in documentation 2014-09-04 13:12:24 +09:00
error-change-upload-blocked.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-commit-already-exists.txt Merge branch 'stable-2.8' 2014-03-11 18:24:13 +09:00
error-contains-banned-commit.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-has-duplicates.txt Fix some legacy-style titles in documentation 2016-07-08 13:45:28 +02:00
error-invalid-author.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-invalid-changeid-line.txt Doc: Consistently refer to "Web UI" rather than "WebUI" 2014-05-02 17:21:22 +09:00
error-invalid-committer.txt Fix reference to Forge Committer access right in documentation 2014-07-08 07:24:01 +00:00
error-messages.txt Provide more informative error message for Change-Id conflicts 2016-04-12 14:18:12 +00:00
error-missing-changeid.txt Consistently refer to Change-Id in documentation 2014-09-04 13:12:24 +09:00
error-missing-subject.txt Improve reject message if Change-Id is in subject 2014-02-21 09:25:33 +01:00
error-multiple-changeid-lines.txt Doc: Consistently refer to "Web UI" rather than "WebUI" 2014-05-02 17:21:22 +09:00
error-no-common-ancestry.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-no-new-changes.txt Clarify documentation of "no new changes" error message 2018-01-26 08:49:52 +09:00
error-non-fast-forward.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-not-a-gerrit-administrator.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-not-allowed-to-upload-merges.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-not-permitted-to-create.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-not-signed-off-by.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-not-valid-ref.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-permission-denied.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
error-prohibited-by-gerrit.txt Rename 'Push Annotated/Signed Tag' permission to 'Create Annotated/Signed Tag' 2016-09-08 13:50:04 +09:00
error-project-not-found.txt Doc: Consistently refer to "Web UI" rather than "WebUI" 2014-05-02 17:21:22 +09:00
error-push-fails-due-to-commit-message.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
error-same-change-id-in-multiple-changes.txt Provide more informative error message for Change-Id conflicts 2016-04-12 14:18:12 +00:00
error-upload-denied.txt Fix some legacy-style titles in documentation 2016-07-08 13:45:28 +02:00
i18n-readme.txt Use the new section title style in Asciidoctor. 2013-12-20 12:55:51 -08:00
index.txt Update link to source.android.com 2017-07-14 10:48:06 +09:00
install-j2ee.txt Fix broken formatting in Tomcat reverse proxy config documentation 2014-10-21 11:04:42 +09:00
install-quick.txt Update link to source.android.com 2017-07-14 10:48:06 +09:00
install.txt Documentation: Remove references to optional BouncyCastle libraries 2018-01-12 10:03:52 +01:00
intro-project-owner.txt Fix documentation about create and delete branches 2018-03-19 13:04:01 -04:00
intro-quick.txt intro-quick: replace http:// with ssh:// in fetch example 2018-02-02 08:21:06 +09:00
intro-user.txt Documentation: Also consider the use of kerberos authentication over SSH 2017-08-28 01:44:52 +02:00
js-api.txt Doc: Fix code example in JS API 2018-05-23 09:48:42 +03:00
json.txt Documentation: Clarify ref-updated event content when ref is deleted 2018-03-22 09:44:15 +09:00
metrics.txt Enable metrics for core queues 2018-06-06 06:19:26 +09:00
pgm-daemon.txt Some more broken synopsis formattings in documentation 2016-07-08 13:47:29 +02:00
pgm-gsql.txt Some more broken synopsis formattings in documentation 2016-07-08 13:47:29 +02:00
pgm-index.txt Support Jdbc implementation of AccountPatchReviewStore 2017-04-26 09:28:57 +02:00
pgm-init.txt init: Add a flag to force-delete the cache 2016-10-06 17:20:01 +02:00
pgm-LocalUsernamesToLowerCase.txt Fix rendering in documentation of LocalUsernamesToLowerCase 2017-09-07 14:50:39 +00:00
pgm-MigrateAccountPatchReviewDb.txt Fix account_patch_reviews for mysql 2018-02-15 21:40:22 +00:00
pgm-passwd.txt Gerrit command line utility to set/update secure.config 2017-01-12 00:25:25 +00:00
pgm-prolog-shell.txt Some more broken synopsis formattings in documentation 2016-07-08 13:47:29 +02:00
pgm-reindex.txt Remove --dry-run option from reindex command documentation 2016-07-08 15:26:42 +02:00
pgm-rulec.txt Some more broken synopsis formattings in documentation 2016-07-08 13:47:29 +02:00
pgm-SwitchSecureStore.txt Some more broken synopsis formattings in documentation 2016-07-08 13:47:29 +02:00
project-configuration.txt Fix documentation about create and delete branches 2018-03-19 13:04:01 -04:00
prolog-change-facts.txt Add an 'unresolved_comments_count' prolog fact for each change 2017-03-03 06:09:07 +00:00
prolog-cookbook.txt Prolog cookbook: fix several examples. 2018-04-20 13:29:55 +00:00
replace_macros.py license and doc: Add support for python3 2018-03-08 15:36:20 +09:00
rest-api-access.txt Merge branch 'stable-2.13' 2016-10-03 13:32:09 +09:00
rest-api-accounts.txt Add missing configuations in EditPreferencesInfo doc 2018-01-23 23:58:17 +00:00
rest-api-changes.txt CreateChange: Strip comment lines out of input commit message 2018-06-07 16:08:38 +09:00
rest-api-config.txt rest-api-config: Remove reference to auth.gitBasicAuth 2017-03-01 17:43:10 +09:00
rest-api-documentation.txt Remove Buck based build 2017-01-23 12:44:58 +00:00
rest-api-groups.txt Docs: Clarify that for external groups the name in GroupInfo can be missing 2018-04-17 11:15:06 +00:00
rest-api-plugins.txt Improve documentation of list plugins 'all' option 2017-07-28 16:04:01 +01:00
rest-api-projects.txt Fix invalid json example in POST access endpoint 2017-12-18 15:00:40 -05:00
rest-api.txt gerrit-server: use hashed passwords for HTTP. 2017-02-28 09:09:33 +01:00
user-change-cleanup.txt Add background job to abandon inactive changes automatically 2015-06-25 07:26:25 +02:00
user-changeid.txt Work around asciidoctor handling of nested ` and * 2015-04-06 17:22:37 +09:00
user-dashboards.txt Add user guide 2015-04-30 14:37:09 +00:00
user-inline-edit.txt Fix various typos, spelling mistakes, and inconsistencies 2016-09-06 16:27:49 +09:00
user-named-destinations.txt Add named destinations support 2015-09-03 10:50:07 -06:00
user-named-queries.txt Move 'User Refs' docs to the intro-user doc. 2015-09-04 14:55:15 +00:00
user-notify.txt Fix formatting of example blocks 2016-07-07 14:06:31 +02:00
user-review-ui.txt user-review-ui: Fix spelling 2017-06-29 04:31:41 +00:00
user-search-accounts.txt Add account predicate that checks if user can see a certain change 2018-03-22 14:17:39 +09:00
user-search-groups.txt Support to query groups by owner group name 2017-02-10 09:21:55 +01:00
user-search.txt user-search: Remove approval requirement from basic search 2018-04-19 16:36:51 +02:00
user-signedoffby.txt Revert "== GERRIT" in documentation. 2014-03-25 19:44:49 +00:00
user-submodules.txt Replace "the the" occurences with "the" (wrong repetition) 2018-04-19 09:30:07 +02:00
user-upload.txt Documentation: Give OpenSSH Host entry alias a section on its own. 2017-08-28 20:36:31 +02:00