git-svn: disallow ambigious local refspecs

Having multiple fetch refspecs pointing to the same local ref
would be a very bad thing.  Start avoiding the use of fatal() or
exit() inside the modules so we can libify more easily.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 040da92..af61748 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -215,4 +215,15 @@
 
 test_expect_success "$name" "diff -u a expected"
 
+test_expect_failure 'exit if remote refs are ambigious' "
+        git-repo-config --add svn-remote.git-svn.fetch \
+                              bar:refs/remotes/git-svn &&
+        git-svn migrate
+        "
+test_expect_failure 'exit if init-ing a would clobber a URL' "
+        git-repo-config --unset svn-remote.git-svn.fetch \
+                                '^bar:refs/remotes/git-svn$' &&
+        git-svn init $svnrepo/bar
+        "
+
 test_done