From 23dd313d76f2254a7a5c58283cb76236a160647b Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Mon, 19 Feb 2018 11:21:23 +0000 Subject: Convert Gitaly commit parent IDs to array as early as possible The tracking issue if this causes problems is https://gitlab.com/gitlab-org/gitaly/issues/1028 --- lib/gitlab/git/commit.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb index ea59978c58a..ae27a138b7c 100644 --- a/lib/gitlab/git/commit.rb +++ b/lib/gitlab/git/commit.rb @@ -471,15 +471,6 @@ module Gitlab private - def parent_ids=(shas) - @parent_ids = case shas - when String - JSON.parse(shas) - else - shas - end - end - def init_from_hash(hash) raw_commit = hash.symbolize_keys @@ -517,7 +508,7 @@ module Gitlab @committed_date = Time.at(commit.committer.date.seconds).utc @committer_name = commit.committer.name.dup @committer_email = commit.committer.email.dup - @parent_ids = commit.parent_ids + @parent_ids = Array(commit.parent_ids) end def serialize_keys -- cgit v1.2.1