diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-14 06:06:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-14 06:06:25 +0300 |
commit | 29c01c6c91558358c37ba45b03f240632bfb918d (patch) | |
tree | c6475afaf98ce740e8ba5fe227e7bd4a95b692cd /doc/api/commits.md | |
parent | eed996ac33a60d5fd8315a62fec8beaa8e907e69 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/commits.md')
-rw-r--r-- | doc/api/commits.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/api/commits.md b/doc/api/commits.md index 3f2932f2666..f4bb09843c8 100644 --- a/doc/api/commits.md +++ b/doc/api/commits.md @@ -317,6 +317,21 @@ Example response: } ``` +In the event of a failed cherry-pick, the response will provide context about +why: + +```json +{ + "message": "Sorry, we cannot cherry-pick this commit automatically. This commit may already have been cherry-picked, or a more recent commit may have updated some of its content.", + "error_code": "empty" +} +``` + +In this case, the cherry-pick failed because the changeset was empty and likely +indicates that the commit already exists in the target branch. The other +possible error code is `conflict`, which indicates that there was a merge +conflict. + ## Revert a commit > [Introduced][ce-22919] in GitLab 11.5. @@ -358,6 +373,19 @@ Example response: } ``` +In the event of a failed revert, the response will provide context about why: + +```json +{ + "message": "Sorry, we cannot revert this commit automatically. This commit may already have been reverted, or a more recent commit may have updated some of its content.", + "error_code": "conflict" +} +``` + +In this case, the revert failed because the attempted revert generated a merge +conflict. The other possible error code is `empty`, which indicates that the +changeset was empty, likely due to the change having already been reverted. + ## Get the diff of a commit Get the diff of a commit in a project. |