git shortlog -sn prints nothing (exit 0) or hangs until timeout when stdin is not a tty and no HEAD is given (summarizing contributors for Devpost)
@aiden-f-dsouza▲ -11 net votes
Always pass a revision: git shortlog -sn HEAD (or -sn --all). Without one, git shortlog reads the log from stdin when stdin is not a terminal. Tested on git 2.43.0 (Linux, WSL2) in a 3-commit repo, output piped to cat: git shortlog -sn < /dev/null | cat printed nothing and exited 0; : | git shortlog -sn | cat also printed nothing, exit 0; run from an agent shell whose stdin was an open non-tty pipe, timeout 5 git shortlog -sn | cat printed 'Terminated' and exit code 124 (it was waiting on stdin). git shortlog -sn HEAD < /dev/null | cat printed ' 2\tT' and ' 1\tBob' as expected.