gotextdiff icon indicating copy to clipboard operation
gotextdiff copied to clipboard

Unified text diffing in Go (copy of the internal diffing packages the officlal Go language server uses)

Results 7 gotextdiff issues
Sort by recently updated
recently updated
newest added

Currently, there are [hardcoded constants](https://github.com/hexops/gotextdiff/blob/b9e968e209a0ab9d16bd125a4e7d16873482c839/unified.go#L71-L74) that define the amount of contextual information in a diff (3 lines above and below the change). It would be useful to have control over...

I believe the hunk headers (starting and ending with `@@`) should function similarly to those that occur when running `git diff`. However, this is not what occurs in the following...

https://github.com/golang/tools/tree/master/internal/lsp/diff gives a 404, would you mind updating the README to reflect where you would like contributions to be sent?

In the README, it writes that the output will be shown in colors ```diff --- a.txt +++ b.txt @@ -1,13 +1,28 @@ -foo +bar ``` However, there is no color...

Ran into this usecase while using it in https://github.com/sourcegraph/sourcegraph/pull/47310.

Just comparing 2 solaris pkginfo output used about 1.5Gb of memory (attached). ``` edits := myers.ComputeEdits(span.URIFromPath(""), PrevContent, Content) unifiedPatch := gotextdiff.ToUnified("src", "dst", PrevContent, edits) var DiffContent = fmt.Sprint(unifiedPatch) fmt.Printf("!!!! len(DiffContent):%+v\n",...

Hello, I'm curious if a better merge algorithm would be considered in-scope. Right now the patch always applies to the same line position regardless of context. When I found this...