sourcegraph / go-diff

Unified diff parser and printer for Go
https://sourcegraph.com/github.com/sourcegraph/go-diff
Other
425 stars 47 forks source link

diff: support renamed, updated binary file #38

Closed stephen closed 4 years ago

stephen commented 4 years ago

This commit parses a diff with a renamed, updated binary file and adds a test case for it.

codecov[bot] commented 4 years ago

Codecov Report

Merging #38 into master will decrease coverage by 2.24%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
- Coverage   29.48%   27.24%   -2.25%     
==========================================
  Files           5        5              
  Lines        1177     1138      -39     
==========================================
- Hits          347      310      -37     
  Misses        784      784              
+ Partials       46       44       -2     
Impacted Files Coverage Δ
diff/parse.go 79.93% <100.00%> (-2.12%) :arrow_down:
diff/print.go 44.73% <0.00%> (-0.95%) :arrow_down:
diff/diff.go 86.48% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c3b8bb2...1e7398a. Read the comment docs.

unknwon commented 4 years ago

Thanks for the PR!

I am not the best to review this code but .DS_Store definitely shouldn't be committed :)

keegancsmith commented 4 years ago

@stephen ping :)

stephen commented 4 years ago

Thanks for the reminder. I removed the .DS_Store and rebased to fix conflicts. I tried to match the changes in https://github.com/sourcegraph/go-diff/commit/f935979a5d70d2f3034edc6de94c77be621ce500 in my new diff.

stephen commented 4 years ago

Separately, adding .DS_Store to a .gitignore might be nice.

keegancsmith commented 4 years ago

Thanks!