file_path = path
unless file_name =~ Gitlab::Regex.path_regex
- return error("Your changes could not be commited, because file name contains not allowed characters")
+ return error("Your changes could not be committed, because file name contains not allowed characters")
end
blob = repository.blob_at(ref, file_path)
if blob
- return error("Your changes could not be commited, because file with such name exists")
+ return error("Your changes could not be committed, because file with such name exists")
end
new_file_action = Gitlab::Satellite::NewFileAction.new(current_user, project, ref, file_path)
if created_successfully
success
else
- error("Your changes could not be commited, because the file has been changed")
+ error("Your changes could not be committed, because the file has been changed")
end
end
end
if deleted_successfully
success
else
- error("Your changes could not be commited, because the file has been changed")
+ error("Your changes could not be committed, because the file has been changed")
end
end
end
if created_successfully
success
else
- error("Your changes could not be commited, because the file has been changed")
+ error("Your changes could not be committed, because the file has been changed")
end
end
end
result = Files::DeleteContext.new(@project, current_user, params, @ref, @path).execute
if result[:status] == :success
- flash[:notice] = "Your changes have been successfully commited"
+ flash[:notice] = "Your changes have been successfully committed"
redirect_to project_tree_path(@project, @ref)
else
flash[:alert] = result[:error]
result = Files::UpdateContext.new(@project, current_user, params, @ref, @path).execute
if result[:status] == :success
- flash[:notice] = "Your changes have been successfully commited"
+ flash[:notice] = "Your changes have been successfully committed"
redirect_to project_blob_path(@project, @id)
else
flash[:alert] = result[:error]
result = Files::CreateContext.new(@project, current_user, params, @ref, file_path).execute
if result[:status] == :success
- flash[:notice] = "Your changes have been successfully commited"
+ flash[:notice] = "Your changes have been successfully committed"
redirect_to project_blob_path(@project, File.join(@ref, file_path))
else
flash[:alert] = result[:error]