diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-01 10:16:18 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-01 10:16:18 +0000 |
commit | 3fcb9c115d776feba3f71fb58359a3935edfda9b (patch) | |
tree | dec6d3c458141801a47303eb618a94f76ac34f56 | |
parent | c09913217302aa6ab9e6a342a7b79cdc2b0353f6 (diff) | |
parent | 5e75d377059a78f7bb13d954fa3c1cb4ed653766 (diff) | |
download | gitlab-ce-3fcb9c115d776feba3f71fb58359a3935edfda9b.tar.gz |
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.rb | 4 |
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' |