News for hackers. Stuff that matters.
Re:Highlights from Git 2.28 by Myrmornis on Monday July 27, 2020 @04:18PM (#23968973)
You could use `git log -p` instead of `git log` so that the diff is included.

To navigate efficiently between the commits, you could pre-seed less with a regex that matches commit (and file) lines, so that "n" and "N" jump from one commit (or file) to the next, something like this

  LESS="-R --pattern ^(commit|diff) " git log -p
Delta[1] makes this convenient: delta --navigate.

[1] https://github.com/dandavison/delta

(Disclosure: I am the author of delta)

Re:Highlights from Git 2.28 by jancsika on Monday July 27, 2020 @04:23PM (#23969025)
Ooh, thanks. I think I can get away with git log -p to fetch the whole enchilada.

There are just so many things in the git CLI that are a single step away from being usable by default. For example, in Gitlab by default you see a tag to let you know if a branch has been merged. I can do the same in cli by exploring my flag options, but that time adds up for every little convenience that happens to be missing. (And as Gitlab shows, it's not impossible to choose a set of default conveniences that cover the bases for an enormous percentage of the users.)

I'll definitely look into that jumping pattern, too. Thanks for the hints!

Re:Highlights from Git 2.28 by codys on Monday July 27, 2020 @05:08PM (#23969404)
The one issue I've seen with using `-p` here is that `git log -p` has worse performance when compared to plain `git log` because it needs to calculate diffs, and when searching in less ends up searching the diff contents (even when this is not desired)
Re:Highlights from Git 2.28 by paxswill on Monday July 27, 2020 @08:23PM (#23970934)
If you know the specific string (or regex) you’re searching for in the commit messages, combining `-p` with one of the pickaxe [0] options might be a bit faster.

0: http://www.philandstuff.com/2014/02/09/git-pickaxe.html

Re:Highlights from Git 2.28 by noir_lord on Monday July 27, 2020 @04:30PM (#23969094)
Wow, this looks incredible.

I currently use diff-so-fancy which is nice enough but as someone who looks at a lot of diffs a day this seems like a big upgrade.

Re:Highlights from Git 2.28 by adz5a on Monday July 27, 2020 @04:55PM (#23969273)
Hello, thanks for pointing out your tool. I use diff-so-fancy as a pager but I will most definitely try your tool.