gitlabhq/gitlabhq — pull request #5048 by Nullreff (2013-09-12 03:35:42+00:00)
Title: Fix bug with rendering changing images in commits

When viewing the diff for a changed image file, two bugs occur:

* Both the 'before' and 'after' images link to the 'after' commit
* Visiting the link for either image will cause a error

The first is caused by both image links referencing `@commit.id` rather than `@commit.parent_id`. The second is caused by the use of `project_tree_path` which is used for creating links to directories in the git file tree. `project_blob_path` (which links to files) should be used instead.

[Live example](http://demo.gitlab.com/gitlab/gitlabhq/commit/cc1ba255d6c5ffdce87a357ba7ccc397a4f4026b)