Add file type change to git diff-tree regexp

Fixes #24286.
update: guard against nil in tap migrations