Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: google/go-cmp
base: v0.5.5
Choose a base ref
...
head repository: google/go-cmp
compare: v0.5.6
Choose a head ref
  • 4 commits
  • 4 files changed
  • 2 contributors

Commits on Apr 12, 2021

  1. Fix typo in path.go (#256)

    s/seperate/separate/
    eltociear committed Apr 12, 2021
    Copy the full SHA
    1ee4af8 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2021

  1. Cleanup edit groups after coalescing (#259)

    Even with an optimal diffing algoritm, coalescing adjacent edit groups
    may cause the corresponding pair of strings for an edit group to have
    leading or trailing spans of equal elements.
    
    While this is technically a correct representation of a diff,
    it is a suboptimal outcome. As such, scan through all unequal groups and
    move leading/trailing equal spans to the preceding/succeeding equal group.
    
    Before this change:
        strings.Join({
          "org-4747474747474747,bucket-4242424242424242:m,tag1=a,tag2=aa",
      -   ",#=_value _value=2 ",
      +   " _value=2 ",
          `11 org-4747474747474747,bucket-4242424242424242:m,tag1=a,tag2=bb`,
      -   ",#=_value _value=2 2",
      +   " _value=2 2",
          `1  org-4747474747474747,bucket-4242424242424242:m,tag1=b,tag2=cc`,
      -   ",#=_value",
          ` _value=1 21 org-4747474747474747,bucket-4242424242424242:m,tag1`,
          "=a,tag2",
      -   "=dd,#=_value",
      +   "=dd",
          ` _value=3 31 org-4747474747474747,bucket-4242424242424242:m,tag1`,
      -   "=c,#=_value",
      +   "=c",
          ` _value=4 41 `,
        }, "")
    
    After this change:
        strings.Join({
          "org-4747474747474747,bucket-4242424242424242:m,tag1=a,tag2=aa",
      -   ",#=_value",
          ` _value=2 11 org-4747474747474747,bucket-4242424242424242:m,tag1`,
          "=a,tag2=bb",
      -   ",#=_value",
          ` _value=2 21 org-4747474747474747,bucket-4242424242424242:m,tag1`,
          "=b,tag2=cc",
      -   ",#=_value",
          ` _value=1 21 org-4747474747474747,bucket-4242424242424242:m,tag1`,
          "=a,tag2=dd",
      -   ",#=_value",
          ` _value=3 31 org-4747474747474747,bucket-4242424242424242:m,tag1`,
          "=c",
      -   ",#=_value",
          ` _value=4 41 `,
        }, "")
    dsnet committed May 25, 2021
    Copy the full SHA
    c5c3378 View commit details
    Browse the repository at this point in the history
  2. Avoid diffing by lines if inefficient (#260)

    Avoid diffing by lines if it turns out to be significantly less
    efficient than diffing by bytes.
    
    Before this change:
        (
        	"""
      - 	d5c14bdf6bac81c27afc5429500ed750
      - 	25483503b557c606dad4f144d27ae10b
      - 	90bdbcdbb6ea7156068e3dcfb7459244
      - 	978f480a6e3cced51e297fbff9a506b7
      + 	Xd5c14bdf6bac81c27afc5429500ed750
      + 	X25483503b557c606dad4f144d27ae10b
      + 	X90bdbcdbb6ea7156068e3dcfb7459244
      + 	X978f480a6e3cced51e297fbff9a506b7
        	"""
        )
    
    After this change:
        strings.Join({
      + 	"X",
        	"d5c14bdf6bac81c27afc5429500ed750\n",
      + 	"X",
        	"25483503b557c606dad4f144d27ae10b\n",
      + 	"X",
        	"90bdbcdbb6ea7156068e3dcfb7459244\n",
      + 	"X",
        	"978f480a6e3cced51e297fbff9a506b7\n",
        }, "")
    dsnet committed May 25, 2021
    Copy the full SHA
    9181d1e View commit details
    Browse the repository at this point in the history
  3. Print as text if mostly text (#258)

    The previous heuristic of treating strings as binary data
    if it contains any invalid UTF-8 was too strict.
    Loosen the heuristic to check if most of the characters
    are printable text.
    
    Fixes #257
    dsnet committed May 25, 2021
    Copy the full SHA
    d103655 View commit details
    Browse the repository at this point in the history