There is no pre-defined hook that will allow you to do exactly what you want.
If your developers are fetching over ssh, you might be able to create a wrapper script for git-upload-pack
which hides the real git-upload-pack
and calls git svn fetch
on the repository (while being absolutely sure to squash all output and errors) before execing the real git-upload-pack
.
This might be quite fiddly to set up and make robust, though. You might be better off providing a way for your developers to manually cause a call to git svn fetch
on the remote repository and encouraging them to use an alternative fetch alias that does this first (and waits for it to complete!) before doing the real fetch.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…