This fixes PR46992.
Git stores symlinks as text files and we should not format them even if
they have one of the requested extensions.
(Move the call to cd_to_toplevel() up a few lines so we can also print
the skipped symlinks during verbose output.)
Is this print supposed to stay or is it a remnant of print-debugging?