# package lockfiles
poetry.lock -diff linguist-generated=true
go.sum -diff linguist-generated=true
yarn.lock -diff linguist-generated=true
Cargo.lock -diff linguist-generated=true
# generated protobufs
*pb2.py -diff linguist-generated=true
*pb2.pyi -diff linguist-generated=true
*pb2_grpc.py -diff linguist-generated=true
*pb2_grpc.pyi -diff linguist-generated=true
*.pb.go -diff linguist-generated=trueBetter Git diff output for Ruby, Python, Elixir, Go
41–50 of 53 posts
Re: Better Git diff output for Ruby, Python, Elixir, Go
#42I 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).
Thinking "perhaps, it's just the default color scheme", I installed it again and tried the `delta --show-syntax-themes` command to see the themes in action. Didn't like any of them. So uninstalled it again.
I like my current setup, which is:
[core] pager = less -FMRiXx4
Re: Better Git diff output for Ruby, Python, Elixir, Go
#43I tried to figure out why the extensions aren't configured by default. I 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 user…
I rarely see files with incorrect file extensions outside of collisions and user error? I don’t see any downside apart from extensionless files like shell scripts with the executable flag set, shebang, and no file extension which could also be solved. Edit: and if comprehensive correctness was truly desired, file magic could make a better guess, but that would be overkill imo.
Re: Better Git diff output for Ruby, Python, Elixir, Go
#44This makes your git diff highlight the actual different characters between two lines, makes file names easy to see (and easy to copy, due to no a/ b/), makes renames and blank lines clear and readable.
It is so nice to get all this without a separate GUI diff visualiser when doing anything git-related from the command line.
Re: Better Git diff output for Ruby, Python, Elixir, Go
#45A bigger problem is tree structures, it is particularly egregious for HTML and JSON where the output tend to be a complete mess of red and green. I think a good solution would be for git to call out to the respective language servers (the VS Language Server Protocol) and render changes based on AST and syntax specific diffs.
Re: Better Git diff output for Ruby, Python, Elixir, Go
#46Re: Better Git diff output for Ruby, Python, Elixir, Go
#47I 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).
FWIW, it looked great on paper/Github, so I installed and tried it. The colors just overwhelmed me, so I had to uninstall it. Thinking "perhaps, it's just the default color scheme", I installed it again and tried the `delta --show-syntax-themes` command to see the themes in action. Didn't like any of them. So uninstalled it again. I like my current setup, which is: [core] pager = less -FMRiXx4
Re: Better Git diff output for Ruby, Python, Elixir, Go
#48Re: Better Git diff output for Ruby, Python, Elixir, Go
#49Earlier quoted context omitted.
I rarely see files with incorrect file extensions outside of collisions and user error? I don’t see any downside apart from extensionless files like shell scripts with the executable flag set, shebang, and no file extension which could also be solved. Edit: and if comprehensive correctness was truly desired, file magic could make a better guess, but that would be overkill imo.
What's a '.m' file? Matlab, Objective-C, or Mathematica?