The .git/svn directory can be created if you run any git svn in any repository - for example. just git svn info , as Carl Norum offers , will create it. However, a slightly better test might be that .git/svn exists and is not empty, for example
[ -d .git/svn ] && [ x != x"$(ls -A .git/svn/)" ] && echo Looks like git-svn
If you need a more rigorous test, you can view the HEAD history for any commit messages containing git-svn-id - essentially what git svn info does before it refuses. For instance:
[ x != x"$(git log -n 1 --grep='^\s*git-svn-id' --oneline)" ] && echo "git-svn!"
... but it sounds like it might be too slow for your use case.
The source code in git-svn.perl describes the location of the git-svn repository in different versions:
... so that you can write tests for all those if you want to be careful to catch all the different versions.
source share