summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-08-06 14:28:22 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-08-06 14:28:22 +0200
commitaa5e663f85cd7c29910c37ab9716317961c31e91 (patch)
tree13e7892f928e56078eadf70020d41594fc19e65d /doc/api
parent11d5ad2f17ed487ac10414c16480a23cedf60d3c (diff)
downloadgitlab-ce-aa5e663f85cd7c29910c37ab9716317961c31e91.tar.gz
List API file edit failure conditions in docs
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/repository_files.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/api/repository_files.md b/doc/api/repository_files.md
index ae56b04b6ce..e21e5aa8d72 100644
--- a/doc/api/repository_files.md
+++ b/doc/api/repository_files.md
@@ -80,6 +80,13 @@ Parameters:
- `content` (required) - New file content
- `commit_message` (required) - Commit message
+If the commit fails for any reason we return a 400 error with a non-specific
+error message. Possible causes for a failed commit include:
+- the `file_path` contained `/../` (attempted directory traversal);
+- the new file contents were identical to the current file contents, i.e. the
+ user tried to make an empty commit;
+- the branch was updated by a Git push while the file edit was in progress.
+
## Delete existing file in repository
```