summaryrefslogtreecommitdiff
path: root/doc/api/repositories.md
diff options
context:
space:
mode:
authorGabor Nagy <mail@aigeruth.hu>2013-08-25 23:21:00 +0200
committerGabor Nagy <mail@aigeruth.hu>2013-08-25 23:48:11 +0200
commitd139cc6b3283cef8f14660738d423ea63317203c (patch)
tree8de146b9f07a4aa74f40d0c48cfac156783747e8 /doc/api/repositories.md
parent2b36dee64485062c69779217d4a202e5ca1b67bd (diff)
downloadgitlab-ce-d139cc6b3283cef8f14660738d423ea63317203c.tar.gz
Adds feature: get a diff via API.
Diffstat (limited to 'doc/api/repositories.md')
-rw-r--r--doc/api/repositories.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 7a9f766ba1d..229d4409ea6 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -239,6 +239,34 @@ Parameters:
]
```
+## Get the diff of a commit
+
+Get the diff of a commit in a project.
+
+```
+GET /projects/:id/repository/commit/:sha
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `sha` (required) - The name of a repository branch or tag or if not given the default branch
+
+```json
+[
+ {
+ "diff": "--- a/doc/update/5.4-to-6.0.md\n+++ b/doc/update/5.4-to-6.0.md\n@@ -71,6 +71,8 @@\n sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production\n sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production\n \n+sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production\n+\n ```\n \n ### 6. Update config files",
+ "new_path": "doc/update/5.4-to-6.0.md",
+ "old_path": "doc/update/5.4-to-6.0.md",
+ "a_mode": null,
+ "b_mode": "100644",
+ "new_file": false,
+ "renamed_file": false,
+ "deleted_file": false
+ }
+]
+```
+
## List repository tree
Get a list of repository files and directories in a project.