Better Git diff output for Ruby, Python, Elixir, Go
1–10 of 53 posts
Re: Better Git diff output for Ruby, Python, Elixir, Go
#2Edit: got it. Thanks!
Re: Better Git diff output for Ruby, Python, Elixir, Go
#3Am I missing something? Those diffs look identical. Edit: got it. Thanks!
Re: Better Git diff output for Ruby, Python, Elixir, Go
#4Am I missing something? Those diffs look identical. Edit: got it. Thanks!
@@ -24,7 +24,7 @@ class TicketPdf
Configured: @@ -24,7 +24,7 @@ def tickets_as_htmlRe: Better Git diff output for Ruby, Python, Elixir, Go
#5Am I missing something? Those diffs look identical. Edit: got it. Thanks!
Re: Better Git diff output for Ruby, Python, Elixir, Go
#6Am I missing something? Those diffs look identical. Edit: got it. Thanks!
Re: Better Git diff output for Ruby, Python, Elixir, Go
#7This should speed up my adds, and cut down on accidental stagings.
Re: Better Git diff output for Ruby, Python, Elixir, Go
#8https://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
#9Am I missing something? Those diffs look identical. Edit: got it. Thanks!
The header that indicates context. Default: @@ -24,7 +24,7 @@ class TicketPdf Configured: @@ -24,7 +24,7 @@ def tickets_as_html
Re: Better Git diff output for Ruby, Python, Elixir, Go
#10I found a 2011 patch/proposal to make it the default, which appears to have stranded: https://lore.kernel.org/git/20110825204047.GA9948@sigill.int...
With some discussion by the patch's author of possible downsides (https://lore.kernel.org/git/20110826025913.GC17625@sigill.in...):
> I think it could be a problem in the future if the builtin userdiff drivers started growing more invasive options, like automatically claiming to be non-binary (i.e., setting diff.cpp.binary = false by default). In other words, I think we have two options:
> 1. Builtin drivers like "cpp" can stay minimal, only setting funcname and color-words headers that aren't going to produce terrible results if we are wrong about detecting by extension.
> 2. We force the user to identify file types manually, so we can't be wrong. The "cpp" diff driver means "you are a text C file", and if a user mis-marks a binary file with that diff driver, they are the one who is wrong.
> So if it's an either/or situation, we should decide not only that extension auto-detection is a good feature, but that it trumps adding more advanced features to the builtin drivers in the future.
> Or we could decide that the extensions really are good enough, and if you really do have binary files named "foo.c", it's your problem to override the defaults with "*.c -diff".
There might be more recent discussion that I didn't find.