IMPORTANT: JAC is a Public system and anyone on the internet will be able to view the data in the created JAC tickets. Please don’t include Customer or Sensitive data in the JAC ticket.
Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-7097

Diff is incorrect when source branch modified before destination branch

    • Icon: Bug Bug
    • Resolution: Answered
    • Icon: Low Low
    • None
    • 3.6.1
    • None
    • Stash 3.6.1 linux x86_64 on both:

      • Fedora 20, git 2.1.0, JDK8
      • RHEL6, git 2.2.2, JDK7

      If a portion of a file is independently deleted in two branches, then sometimes the diff view is incorrect.

      To reproduce, create a new repo in stash, then run the attached shell script (changing the remote URL if needed), and view the diff between master and branch:

      http://localhost:7990/stash/projects/TEST/repos/diffbug/compare/diff?targetBranch=refs%2Fheads%2Fmaster&sourceBranch=refs%2Fheads%2Fbranch

      Expected results: the diff view shows the first line changed from 'MASTER START' to 'BRANCH START', like 'git diff master branch' shows:

      $ git diff master branch
      diff --git a/test.txt b/test.txt
      index 9199536..91ad9bb 100644
      — a/test.txt
      +++ b/test.txt
      @@ -1,3 +1,3 @@
      -MASTER START
      +BRANCH START

      END

      Actual results: the diff view shows the 'MIDDLE' section having been deleted as well as the first line changing

      Reversing the source/dest branches (ie http://localhost:7990/stash/projects/TEST/repos/diffbug/compare/diff?targetBranch=refs%2Fheads%2Fbranch) shows the ONLY the middle section changing WITHOUT the first line changing.

      This affects both the side-by-side diff and the unified Once a pull request is made, then the diff in the PR is correct.

        1. stash-diffbug.sh
          0.4 kB
        2. stash-diffbug.sh
          0.4 kB

            Loading...
            IMPORTANT: JAC is a Public system and anyone on the internet will be able to view the data in the created JAC tickets. Please don’t include Customer or Sensitive data in the JAC ticket.
            Uploaded image for project: 'Bitbucket Data Center'
            1. Bitbucket Data Center
            2. BSERV-7097

            Diff is incorrect when source branch modified before destination branch

              • Icon: Bug Bug
              • Resolution: Answered
              • Icon: Low Low
              • None
              • 3.6.1
              • None
              • Stash 3.6.1 linux x86_64 on both:

                • Fedora 20, git 2.1.0, JDK8
                • RHEL6, git 2.2.2, JDK7

                If a portion of a file is independently deleted in two branches, then sometimes the diff view is incorrect.

                To reproduce, create a new repo in stash, then run the attached shell script (changing the remote URL if needed), and view the diff between master and branch:

                http://localhost:7990/stash/projects/TEST/repos/diffbug/compare/diff?targetBranch=refs%2Fheads%2Fmaster&sourceBranch=refs%2Fheads%2Fbranch

                Expected results: the diff view shows the first line changed from 'MASTER START' to 'BRANCH START', like 'git diff master branch' shows:

                $ git diff master branch
                diff --git a/test.txt b/test.txt
                index 9199536..91ad9bb 100644
                — a/test.txt
                +++ b/test.txt
                @@ -1,3 +1,3 @@
                -MASTER START
                +BRANCH START

                END

                Actual results: the diff view shows the 'MIDDLE' section having been deleted as well as the first line changing

                Reversing the source/dest branches (ie http://localhost:7990/stash/projects/TEST/repos/diffbug/compare/diff?targetBranch=refs%2Fheads%2Fbranch) shows the ONLY the middle section changing WITHOUT the first line changing.

                This affects both the side-by-side diff and the unified Once a pull request is made, then the diff in the PR is correct.

                  1. stash-diffbug.sh
                    0.4 kB
                  2. stash-diffbug.sh
                    0.4 kB

                        Unassigned Unassigned
                        06fbb7509c24 Bradley Baetz
                        Votes:
                        0 Vote for this issue
                        Watchers:
                        8 Start watching this issue

                          Created:
                          Updated:
                          Resolved:

                            Unassigned Unassigned
                            06fbb7509c24 Bradley Baetz
                            Affected customers:
                            0 This affects my team
                            Watchers:
                            8 Start watching this issue

                              Created:
                              Updated:
                              Resolved: