Git pre-capture features

in my script, I support the svn-synchronized git repository on the server. all the developers in my group use this repository to receive their updates.
I could not find a way to run the automatic "git svn fetch" (or any other command) before the developer selects the latest changes.
my current workaround is to run a cron job that synchronizes in SVN-related changes every 5 minutes. is it possible to have such a prefetch capture ?
thanks

+7
git
source share
1 answer

There is no predefined hook that allows you to do exactly what you want.

If your developers are extracting due to ssh, you can create a script shell for git-upload-pack that hides the real git-upload-pack and invokes git svn fetch in the repository (while absolutely sure to squash all output and errors) before doing real git-upload-pack .

It can be quite difficult to create and make reliable. You might be better off letting your developers manually invoke the git svn fetch call on the remote repository and encourage them to use the alternative retrieval alias, which does this first (and waits for it to finish!) Before making the actual fetch.

+2
source share

All Articles