I was wondering how to get git to allways show you the full file in a git diffrather than only showing the hunks.
So I first went with the -Woption but I read that this actually tries to be clever and tries to find the function context of the change. I don’t want git to be clever. I want git to be dead simple and only show me the full file with the changes.
So I finally figured out that you can add -U9999999 and now I am like WTF!? and wonder what kind of crazy hack this is and why it’s not documented anywhere?
git diff -U9999999means “do a unified diff and show 9,999,999 lines of context for each hunk.” It is documented;git help diffshows:-U<n>, --unified=<n> Generate diffs with <n> lines of context instead of the usual three. Implies -p.Of course, if you have a file with more than 9,999,999 lines between differing regions, this won’t actually show the whole file, but for all practical purposes, it will always show the whole thing.