Supply the quiet option to show to suppress the diff.
git show --quiet HEAD
So for your example, author name:
git show --quiet --pretty=format:%an
Supply the quiet option to show to suppress the diff.
git show --quiet HEAD
So for your example, author name:
git show --quiet --pretty=format:%an