which is now not the requested resource at all, but is a Phabricator diffusion start page (https://phabricator.wikimedia.org/diffusion/). It is not appropriate to use '301 Moved Permanently' in this scenario.
The issue is, that the link is not 100% correct. It's missing .git after the repo name. https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMath.git/REL1_23/texvccheck%2FREADME works.
I don't know how such links became alive, but my spider didn't find them on Gitblit page itself, thus they are perhaps some sort of "syntactic sugar / short(er) / cool(er) URLs" added OR leftovers from past when the .git extension hasn't been used. (I am not familiar with Gitblit history, just assuming on the base of the spider results.)
For the time being it would be useful to add some monitoring/logging of URLs being redirected to the Diffusion main page and their referers (cc Operations) to find out referers we can correct somehow and (undocumented) URLs like this to see if they can be added to redirect rules as well.