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:
authorDouwe Maan <douwe@gitlab.com>2018-05-01 13:16:18 +0300
committerDouwe Maan <douwe@gitlab.com>2018-05-01 13:16:18 +0300
commit3fcb9c115d776feba3f71fb58359a3935edfda9b (patch)
treedec6d3c458141801a47303eb618a94f76ac34f56
parentc09913217302aa6ab9e6a342a7b79cdc2b0353f6 (diff)
parent5e75d377059a78f7bb13d954fa3c1cb4ed653766 (diff)
Merge branch 'zj-fix-index-rails' into 'master'
Use Ruby methods, not Rails' String#first See merge request gitlab-org/gitlab-ce!18669
-rw-r--r--lib/gitlab/git/raw_diff_change.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/git/raw_diff_change.rb b/lib/gitlab/git/raw_diff_change.rb
index eb3d8819239..92f6c45ce25 100644
--- a/lib/gitlab/git/raw_diff_change.rb
+++ b/lib/gitlab/git/raw_diff_change.rb
@@ -38,7 +38,9 @@ module Gitlab
end
def extract_operation
- case @raw_operation&.first(1)
+ return :unknown unless @raw_operation
+
+ case @raw_operation[0]
when 'A'
:added
when 'C'