DiffChunks() with empty slices fails #10
Closed
Comments
Wow, yep there's a bug in there somewhere. I haven't immediately figured out where it is, though... the code was largely modeled on a research paper, and I made the mistake of using their totally-opaque names for everything, and have now forgotten most of how the implementation works. I'll try to get it fixed, but no promises on timeline. The good news is that, for whatever reason, the algorithm seems to work fine for the usual cases that are called by the "pretty" package, so it's probably some degenerate case that's missing from the code. It could be as simple as hard-coding the "everything added" and "everything deleted" case, but I want to convince myself that the algorithm shouldn't be able to handle that first, before I do it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DiffChunks([]string{}, []string{})
panics with "index out of range".DiffChunks([]string{"foo"}, []string{})
emits an extra empty chunk[0] in the result.0001-Failing-test-cases-for-DiffChunk-of-nil.patch.txt
The text was updated successfully, but these errors were encountered: