diff options
author | Sean McGivern <sean@gitlab.com> | 2018-02-19 14:21:23 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-02-19 14:21:23 +0300 |
commit | 23dd313d76f2254a7a5c58283cb76236a160647b (patch) | |
tree | 9705222e6f7f41b1c83961e59d7759f6f70b48d0 /lib | |
parent | af5cd10e00402937310dfe8e4dfa48b0c15b157a (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/commit.rb | 11 |
1 files changed, 1 insertions, 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 |