summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-22 10:37:55 +0000
committerRémy Coutable <remy@rymai.me>2016-09-22 10:37:55 +0000
commita41df736a77ee8a0ae362d7ea3d63ffd84203d1c (patch)
treef1f01947982d453baac0834ac41bc285d79bef71 /scripts
parent9636b08190b85b2c29b3305dd96c86b3cf789d02 (diff)
parentb0ce4ca11012388b1e4fbc1d928cbf4c0da66104 (diff)
downloadgitlab-ce-a41df736a77ee8a0ae362d7ea3d63ffd84203d1c.tar.gz
Merge branch 'fix-pipeline-for-empty-merge-request-diff' into 'master'
Fix pipeline error when trying to read empty merge request diff When a user pushed something which resulted an empty merge request diff, `st_commits` would be `nil`. Therefore we also need to check if there exists `st_commits`. We could tell this from: ``` ruby def commits @commits ||= load_commits(st_commits || []) end ``` and ``` ruby def save_commits new_attributes = {} commits = compare.commits if commits.present? commits = Commit.decorate(commits, merge_request.source_project).reverse new_attributes[:st_commits] = dump_commits(commits) end update_columns_serialized(new_attributes) end ``` Closes #22438 See merge request !6470
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions