Skip to content
Snippets Groups Projects

Unescape branch names in compare commit

Merged Stan Hu requested to merge stanhu/gitlab-ce:fix-escaped-branches-in-compare into master

The upgrade in GitLab v7.9 to Rails v4.1.9 caused all branch names in the compare commit mode to be escaped (e.g. / to %2F). The compare mode would not always work when comparing against branch names with a forward slash.

Opted to unescape the branch name rather than use a wildcard segment to prevent escaping slashes because it seems like a more sensible URL. The slashes in this case aren't really represented by a tree structure (e.g. /compare/one/two/branch..another/branch/here).

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Stan Hu Added 1 commit:

    Added 1 commit:

    • d6936f56 - Move controller to right place
  • Stan Hu Added 41 commits:

    Added 41 commits:

    • d6936f56...278c3ba4 - 40 commits from branch gitlab-org:master
    • c5f2842f - Unescape branch names in compare commit
  • Author Maintainer

    @DouweM, can you review this one too?

  • Stan Hu Added 1 commit:

    Added 1 commit:

    • a874138b - Prefer addressable/uri to URI
  • Stan Hu Added 52 commits:

    Added 52 commits:

    • a874138b...39a55bdf - 51 commits from branch gitlab-org:master
    • ee92dd16 - Unescape branch names in compare commit
  • Author Maintainer

    Right, I did read that article but promptly forgot it. :) Updated to use Addressable::URI.

  • @stanhu Great :)

  • Douwe Maan Status changed to merged

    Status changed to merged

  • Douwe Maan mentioned in commit e9e79fdf

    mentioned in commit e9e79fdf

  • Douwe Maan mentioned in commit fe38be8b

    mentioned in commit fe38be8b

  • Please register or sign in to reply
    Loading