Software Design X-Rays: sort command snippet not sorting correctly

In the section on “measure interest rate”, the bash command provided a quick way to fetch git change history does not sort entries as I would expect.

The command given is:

git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -r

This version uses a text-based sorting, and will end up with single digit entries preceding multi-digit entries.

Using the -- human-numeric-sort option for the second sort command resolves this issue.
The resulting snippet would be:

git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -rh

( issue encountered on Linux Mint 21.2 )