In your scenario, let’s say you have the following commit:
$ git diff --name-status HEAD~1 M subtool/file1 M subtool/file2 M subtool3/file1
It would produce the following output:
$ git diff --dirstat=files,0 HEAD~1 66.6% subtool/ 33.3% subtool3/
Make sure to add
git diff will by default only show directories with at least 3% changes. I also chose
files as this is the computationally cheapest option and you do not seem to care about specific changes anyway.
$ git diff --dirstat=files,0 HEAD~1 | sed 's/^[ 0-9.]\+% //g' subtool/ subtool3/