Better Git diff output for Ruby, Python, Elixir, Go
11–20 of 53 posts
Re: Better Git diff output for Ruby, Python, Elixir, Go
#12Instead of a regex per file type perhaps a better diff tool could actually diff the parsed code (if possible) and produce a more sensible diff and context?
Re: Better Git diff output for Ruby, Python, Elixir, Go
#13I use delta as a diff tool: https://github.com/dandavison/delta It also offers contextual information as well as side-by-side diffs. For syntax highlighting, it uses the same as bat (the cat clone).
Re: Better Git diff output for Ruby, Python, Elixir, Go
#14I've been using kdiff3 even though it hasn't been updated in a very long time because it has one killer feature: manual diff alignment. I can select a token in both (or all three) files and then force the diff to align at that point. It makes merges a whole lot easier. Sometimes, a single realign is all that's needed for a file merge to sort itself out. Even when that's not the case, it's easier to reason about the changes.
Did I miss something? That is, is that feature available in other diff/merge tools and I just haven't seen it?
Re: Better Git diff output for Ruby, Python, Elixir, Go
#15From the title I was hoping that it was going to do syntax-aware alignment of diffs, but alas no. I've been using kdiff3 even though it hasn't been updated in a very long time because it has one killer feature: manual diff alignment. I can select a token in both (or all three) files and then force the diff to align at that point. It makes merges a whole lot easier. Sometimes, a single realign is all that's needed for…
Sure
Re: Better Git diff output for Ruby, Python, Elixir, Go
#16From the title I was hoping that it was going to do syntax-aware alignment of diffs, but alas no. I've been using kdiff3 even though it hasn't been updated in a very long time because it has one killer feature: manual diff alignment. I can select a token in both (or all three) files and then force the diff to align at that point. It makes merges a whole lot easier. Sometimes, a single realign is all that's needed for…
I was expecting something like MergeResolver which diffs Javascript ASTs:
Re: Better Git diff output for Ruby, Python, Elixir, Go
#17Re: Better Git diff output for Ruby, Python, Elixir, Go
#18From the title I was hoping that it was going to do syntax-aware alignment of diffs, but alas no. I've been using kdiff3 even though it hasn't been updated in a very long time because it has one killer feature: manual diff alignment. I can select a token in both (or all three) files and then force the diff to align at that point. It makes merges a whole lot easier. Sometimes, a single realign is all that's needed for…
I don't think it has syntax-aware alignment, though.
Re: Better Git diff output for Ruby, Python, Elixir, Go
#19Earlier quoted context omitted.
The header that indicates context. Default: @@ -24,7 +24,7 @@ class TicketPdf Configured: @@ -24,7 +24,7 @@ def tickets_as_html
Ah, thanks. I scanned those so many times but I never caught it. I think I'm used to not reading the header because, as this points out, it isn't always useful.
Re: Better Git diff output for Ruby, Python, Elixir, Go
#20Is there a good utility for diff-ing JSON content? I am calling jq to sort keys first and then let the default textual diff highlight the changes, but that's neither convenient nor complete.