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
  • #8559

Closed
Open
Created Jan 12, 2015 by Administrator@rootOwner

'download as' button 'Email patches' or 'Plain diff' fails with 500 error for merge commits

Created by: georgehansper

When viewing the a project commits in gitlab, clicking on a commit-id gives a html colorised view of the diffs that this commit introduces. This page /mygroup/myproject/commit/abcdef12345... also has a button labelled Download As

This presents a plain-text version of the diff.

The Download As feature works for ordinary commits, but fails with an error 500 when viewing a 'merge commit'. The html colorised diff is viewable – only the Download As fails with a 500 error.

The relevant log message from production.log

    Started GET "/mygroup/myproject/commit/cb59cabcdef12345abcdef12345abcdef12345a9.diff" for 127.0.0.1 at 2015-01-12 14:56:09 +1100
    Processing by Projects::CommitController#show as DIFF
      Parameters: {"project_id"=>"mygroup/myproject", "id"=>"cb59cabcdef12345abcdef12345abcdef12345a9"}
    Completed 500 Internal Server Error in 78ms

    Rugged::InvalidError (Commit cb59cabcdef12345abcdef12345abcdef12345a9 is a merge commit):
      app/models/commit.rb:129:in `method_missing'
      app/controllers/projects/commit_controller.rb:28:in `block (2 levels) in show'
      app/controllers/projects/commit_controller.rb:26:in `show'
Assignee
Assign to
Time tracking