-
Notifications
You must be signed in to change notification settings - Fork 222
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
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: sergi/go-diff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: sergi/go-diff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.3.1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 8 commits
- 5 files changed
- 4 contributors
Commits on Oct 27, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 2fe9485 - Browse repository at this point
Copy the full SHA 2fe9485View commit details
Commits on Nov 9, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 138eea2 - Browse repository at this point
Copy the full SHA 138eea2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9add37 - Browse repository at this point
Copy the full SHA d9add37View commit details
Commits on Mar 30, 2021
-
Merge pull request #113 from sreekanth370/master
Added power support for the travis.yml file with ppc64le. and update go versions for package: go-diff
Configuration menu - View commit details
-
Copy full SHA for 849d7eb - Browse repository at this point
Copy the full SHA 849d7ebView commit details
Commits on Mar 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ca1db56 - Browse repository at this point
Copy the full SHA ca1db56View commit details
Commits on Oct 15, 2022
-
fix: use common lineHash to share indice between text1 and text2
Use common cache of line contents between two texts in `DiffLinesToChars` to get line diffs correctly. In some cases, line diffs cannot be retrieved correctly in the standard way (https://github.com/google/diff-match-patch/wiki/Line-or-Word-Diffs#line-mode). In the below case, we failed to get line diffs correctly before this fix. ```go:main.go package main import ( "fmt" "github.com/sergi/go-diff/diffmatchpatch" ) const ( text1 = `hoge: step11: - arrayitem1 - arrayitem2 step12: step21: hoge step22: -93 fuga: flatitem ` text2 = `hoge: step11: - arrayitem4 - arrayitem2 - arrayitem3 step12: step21: hoge step22: -92 fuga: flatitem ` ) func main() { dmp := diffmatchpatch.New() a, b, c := dmp.DiffLinesToChars(text1, text2) diffs := dmp.DiffMain(a, b, false) diffs = dmp.DiffCharsToLines(diffs, c) // diffs = dmp.DiffCleanupSemantic(diffs) fmt.Println(diffs) } ``` ```text:output [{Insert hoge: step11: hoge: } {Equal hoge: } {Insert hoge: } {Equal step11: } {Insert hoge: } {Equal - arrayitem1 } {Insert hoge: } {Equal - arrayitem2 } {Insert hoge: } {Equal step12: } {Insert hoge: } {Equal step21: hoge } {Insert hoge: } {Equal step22: -93 } {Delete fuga: flatitem }] ``` Note: This fix corresponds to a javascript implementation. (ref: https://github.com/google/diff-match-patch/blob/62f2e689f498f9c92dbc588c58750addec9b1654/javascript/diff_match_patch_uncompressed.js#L466)
Configuration menu - View commit details
-
Copy full SHA for 6dbe13c - Browse repository at this point
Copy the full SHA 6dbe13cView commit details
Commits on Jan 13, 2023
-
Merge pull request #135 from nrnrk/fix_use_common_line_hash
Use common lineHash to share indice between text1 and text2 for correct line diffs
Configuration menu - View commit details
-
Copy full SHA for 11fe19c - Browse repository at this point
Copy the full SHA 11fe19cView commit details -
Configuration menu - View commit details
-
Copy full SHA for facec63 - Browse repository at this point
Copy the full SHA facec63View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.2.0...v1.3.1