Basically, I don't want to see the changed content, just the file names, and line numbers.
If you simply want names then you could use:
git diff --names-only
But if there's no built-in option for this, but it is possible to do this in git, with the help of an "external diff" script.
! /bin/sh## run this with:# GIT_EXTERNAL_DIFF=<name of script> git diff ...#case $# in1) "unmerged file [email protected], can't show you line numbers"; exit 1;;7) ;*) echo "I don't know what to do, help"; exit 1;path=$1old_file=$2old_hex=$3old_mode=$4new_file=$5new_hex=$6new_mode=$7printf '%s: ' $pathdiff $old_file $new_file | grep -v '^[<>-]'
! /bin/sh
#
# run this with:
# GIT_EXTERNAL_DIFF=<name of script> git diff ...
case $# in
1) "unmerged file [email protected], can't show you line numbers"; exit 1;;
7) ;
*) echo "I don't know what to do, help"; exit 1;
path=$1
old_file=$2
old_hex=$3
old_mode=$4
new_file=$5
new_hex=$6
new_mode=$7
printf '%s: ' $path
diff $old_file $new_file | grep -v '^[<>-]'
Reference: http://schacon.github.io/git/git.html for GIT_EXTERNAL_DIFF.