Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
21.18k stars 347 forks source link

Avoid random ordering of lines in JSON output. #780

Closed UhhhWaitWhat closed 1 week ago

UhhhWaitWhat commented 3 weeks ago

Pretty much what it says on the tin.

As the lines are stored in a HashMap, calling into_values() gives us a random order of lines. My solution here is definitely not pretty but was the simplest thing that worked without putting too much thought into the code. I hope thats fine. And thank you for the tool :)

Wilfred commented 1 week ago

I went for a different solution, but thanks for the report and PR :)