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>
This commit is contained in:
Eric Wong
2007-01-22 13:52:04 -08:00
parent 8b8fc06824
commit b805b44a92
2 changed files with 44 additions and 7 deletions

View File

@ -215,4 +215,15 @@ echo tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 >> expected
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