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

Closed
Open
Created Jul 29, 2014 by Administrator@rootOwner

Side-by-side diff displays added lines as removed lines

Created by: jameshfisher

I have a merge request on our instance of GitLab for which one hunk of the diff looks like:

-<div class="container" role="main" id="page" ng-view> </div>
+<div class="container -form" role="main" id="page" ng-view> </div>

This displays correctly in the "Inline Diff" viewer. However, in the "Side-by-side Diff" viewer, this displays like so.

Left-hand-side; i.e. removed lines:

<div class="container -form" role="main" id="page" ng-view> </div>

Right-hand-side; i.e. added lines:

<div class="container -form" role="main" id="page" ng-view> </div>

Notice that the left-hand-side is incorrect! It is displaying the added line as a removed line.

A separate hunk in this change is:

-images_dir = "images"
-javascripts_dir = "javascripts"
+images_dir = "static/img"
+javascripts_dir = "target/static/js"
+cache_path = "target/.tmp/.sass-cache"

but this displays in "Side-by-side Diff" view as:

Left-hand-side:

images_dir = "static/img"
javascripts_dir = "target/static/js"

Right-hand-side:

images_dir = "static/img"
javascripts_dir = "target/static/js"
cache_path = "target/.tmp/.sass-cache"

Again, notice that the left-hand-side is incorrect: those lines are added lines, not removed lines.

We are running GitLab commit de9bf7d.

Assignee
Assign to
Time tracking