Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/commits/create_service.rb')
-rw-r--r--app/services/commits/create_service.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/services/commits/create_service.rb b/app/services/commits/create_service.rb
index a498d39d34e..89370bd8abb 100644
--- a/app/services/commits/create_service.rb
+++ b/app/services/commits/create_service.rb
@@ -39,7 +39,12 @@ module Commits
Gitlab::Git::PreReceiveError,
Gitlab::Git::CommandError => ex
Gitlab::ErrorTracking.log_exception(ex)
- error(ex.message)
+
+ if Feature.enabled?(:errors_utf_8_encoding)
+ error(Gitlab::EncodingHelper.encode_utf8_no_detect(ex.message))
+ else
+ error(ex.message)
+ end
end
private