There is a common request in CI, which is check coding style for changed files.
Original idea is get last commited file list, just like what I did in
svn diff --summarize, but didn't get the right way in
Finnally, I find
git whatchanged -n 1 --name-only --pretty="" almost satisfied my requirement. But if you read
man git-whatchanged page, it encouraged you to use
git log instead. So, what's difference between git log and whatchanged?
git whatchanged equals
git log --no-merges.