Add files encoding support on context level

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets
2014-01-16 18:10:35 +02:00
parent 1d497a127b
commit 7001ad2dda
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ module Files
new_file_action = Gitlab::Satellite::NewFileAction.new(current_user, project, ref, file_path)
created_successfully = new_file_action.commit!(
params[:content],
params[:commit_message]
params[:commit_message],
params[:encoding]
)
if created_successfully
+4 -3
View File
@@ -23,10 +23,11 @@ module Files
return error("You can only edit text files")
end
new_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path)
created_successfully = new_file_action.commit!(
edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path)
created_successfully = edit_file_action.commit!(
params[:content],
params[:commit_message]
params[:commit_message],
params[:encooding]
)
if created_successfully