Compare view seems to be broken

Issue #8499 invalid
Melker Narikka
created an issue

It appears that the compare view has some major issues in that it refuses to show a comparison between commits within the same repository.

Here's an example URL that replicates this behaviour:

I don't think this is exactly a feature.

Comments (5)

  1. Erik van Zijst staff

    Compare view performs a 3-way merge, not a diff.

    What this means is that when you compare a commit to its parent, you will see the changes that were introduced in that commit. However, this is not commutative.

    When you reverse the comparision and compare a parent to its child, you will see no changes. This is because the child contains the changes introduced by the parent (as well as all other ancestors -- there is nothing to merge).

    You have swapped the order of the revisions in the URL. The first commit is compared to the second and your first commit (ae1b16a) is an ancestor of your second (50aef1f).

    Turn it around and you get the expected result:

    Now you did uncover a bug on this page. The "Swap source and destination" link should do this for you, but appears to be broken when using SHAs. I've filed an internal issue for this.

  2. Log in to comment