From aa5e663f85cd7c29910c37ab9716317961c31e91 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 6 Aug 2014 14:28:22 +0200 Subject: [PATCH] List API file edit failure conditions in docs --- doc/api/repository_files.md | 7 +++++++ 1 file changed, 7 insertions(+) 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 ```