I don’t know how to do that in the commit message. But after the merge, this will give the names of all the files affected by the merge commit:
git log -m --name-only
For only a list of filenames of the commit:
git log -m -1 --name-only --pretty="format:" <Merge SHA>
There is some white space due to the merge having two parents but that can be easily removed.