4 echo "Usage: $0 svn_url [dir]" >&2
10 if [ ! -f authors.txt ]; then
11 echo "Run \"get-authors $1\" first" >&2
21 if [ -z "$dir" ]; then
22 echo "Usage: $0 $url dir" >&2
27 git svn clone "$url" --authors-file=authors.txt --stdlayout "$dir" &&
31 #cp -rf .git/refs/remotes/tags/* .git/refs/tags/ &&
32 #rm -rf .git/refs/remotes/tags
33 #cp -rf .git/refs/remotes/* .git/refs/heads/ &&
34 #rm -rf .git/refs/remotes
36 # convert svn:ignore to .gitignore
37 git svn create-ignore &&
38 git commit -m "Add .gitignore"
40 # preserve authors.txt
41 cp -p ../authors.txt .git/info &&
42 git config --local --path svn.authorsfile .git/info/authors.txt
45 git gc --aggressive &&
46 echo "Cloned from $url using git-svn" >.git/description &&
47 exec "${VISUAL:-${EDITOR:-vi}}" .git/description