diff options
Diffstat (limited to 'doc/api/commits.md')
-rw-r--r-- | doc/api/commits.md | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/api/commits.md b/doc/api/commits.md index f4896f75c93..117f949aba0 100644 --- a/doc/api/commits.md +++ b/doc/api/commits.md @@ -21,11 +21,11 @@ GET /projects/:id/repository/commits | --------- | ---- | -------- | ----------- | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | `ref_name` | string | no | The name of a repository branch, tag or revision range, or if not given the default branch | -| `since` | string | no | Only commits after or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | -| `until` | string | no | Only commits before or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | +| `since` | string | no | Only commits after or on this date are returned in ISO 8601 format `YYYY-MM-DDTHH:MM:SSZ` | +| `until` | string | no | Only commits before or on this date are returned in ISO 8601 format `YYYY-MM-DDTHH:MM:SSZ` | | `path` | string | no | The file path | | `all` | boolean | no | Retrieve every commit from the repository | -| `with_stats` | boolean | no | Stats about each commit will be added to the response | +| `with_stats` | boolean | no | Stats about each commit are added to the response | | `first_parent` | boolean | no | Follow only the first parent commit upon seeing a merge commit | | `order` | string | no | List commits in order. Possible values: `default`, [`topo`](https://git-scm.com/docs/git-log#Documentation/git-log.txt---topo-order). Defaults to `default`, the commits are shown in reverse chronological order. | @@ -101,9 +101,9 @@ POST /projects/:id/repository/commits | `action` | string | yes | The action to perform, `create`, `delete`, `move`, `update`, `chmod`| | `file_path` | string | yes | Full path to the file. Ex. `lib/class.rb` | | `previous_path` | string | no | Original full path to the file being moved. Ex. `lib/class1.rb`. Only considered for `move` action. | -| `content` | string | no | File content, required for all except `delete`, `chmod`, and `move`. Move actions that do not specify `content` will preserve the existing file content, and any other value of `content` will overwrite the file content. | +| `content` | string | no | File content, required for all except `delete`, `chmod`, and `move`. Move actions that do not specify `content` preserve the existing file content, and any other value of `content` overwrites the file content. | | `encoding` | string | no | `text` or `base64`. `text` is default. | -| `last_commit_id` | string | no | Last known file commit ID. Will be only considered in update, move, and delete actions. | +| `last_commit_id` | string | no | Last known file commit ID. Only considered in update, move, and delete actions. | | `execute_filemode` | boolean | no | When `true/false` enables/disables the execute flag on the file. Only considered for `chmod` action. | ```shell @@ -333,7 +333,7 @@ Example response: } ``` -In the event of a failed cherry-pick, the response will provide context about +In the event of a failed cherry-pick, the response provides context about why: ```json @@ -348,9 +348,9 @@ 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. -When `dry_run` is enabled, the server will attempt to apply the cherry-pick _but +When `dry_run` is enabled, the server attempts to apply the cherry-pick _but not actually commit any resulting changes_. If the cherry-pick applies cleanly, -the API will respond with `200 OK`: +the API responds with `200 OK`: ```json { @@ -358,7 +358,7 @@ the API will respond with `200 OK`: } ``` -In the event of a failure, you'll see an error identical to a failure without +In the event of a failure, an error displays that is identical to a failure without dry run. ## Revert a commit @@ -404,7 +404,7 @@ Example response: } ``` -In the event of a failed revert, the response will provide context about why: +In the event of a failed revert, the response provides context about why: ```json { @@ -417,9 +417,9 @@ 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. -When `dry_run` is enabled, the server will attempt to apply the revert _but not +When `dry_run` is enabled, the server attempts to apply the revert _but not actually commit any resulting changes_. If the revert applies cleanly, the API -will respond with `200 OK`: +responds with `200 OK`: ```json { @@ -427,7 +427,7 @@ will respond with `200 OK`: } ``` -In the event of a failure, you'll see an error identical to a failure without +In the event of a failure, an error displays that is identical to a failure without dry run. ## Get the diff of a commit @@ -511,7 +511,7 @@ In order to post a comment in a particular line of a particular file, you must specify the full commit SHA, the `path`, the `line` and `line_type` should be `new`. -The comment will be added at the end of the last commit if at least one of the +The comment is added at the end of the last commit if at least one of the cases below is valid: - the `sha` is instead a branch or a tag and the `line` or `path` are invalid |