Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #789

Closed
Open
Created May 04, 2012 by Administrator@rootOwner

Submodule update breaks diff functionality

Created by: codec

Merge requests (for example) with a commit that includes change of a submodule breaks the diff view.

ActionView::Template::Error (undefined method `text?' for #<Grit::Submodule "7abc3fc208c44c489d05a9b8e974a8375ac850f4">):
    15:           %strong{:id => "#{diff.b_path}"}= diff.b_path
    16:       %br/
    17:     .diff_file_content
    18:       - if file.text?
    19:         = render "commits/text_file", :diff => diff, :index => i
    20:       - elsif file.image?
    21:         .diff_file_content_image
  app/views/commits/_diffs.html.haml:18:in `block in _app_views_commits__diffs_html_haml___804080178914469005_24703560'
  app/views/commits/_diffs.html.haml:4:in `each'
  app/views/commits/_diffs.html.haml:4:in `each_with_index'
  app/views/commits/_diffs.html.haml:4:in `_app_views_commits__diffs_html_haml___804080178914469005_24703560'
  app/views/commits/compare.html.haml:32:in `_app_views_commits_compare_html_haml__3475857172488992646_46231900'

The diff in rails console

irb(main):013:0> MergeRequest.find(10).diffs.last.diff
  MergeRequest Load (0.6ms)  SELECT "merge_requests".* FROM "merge_requests" WHERE "merge_requests"."id" = ? LIMIT 1  [["id", 10]]
=> "--- a/public/scripts/fileuploader\n+++ b/public/scripts/fileuploader\n@@ -1 +1 @@\n-Subproject commit b3b20b156d6c2dde2881a8667e6ad859a076e1c3\n+Subproject commit dc8da17e0c95999fdffacca962a0d31c5590280c"
Assignee
Assign to
Time tracking