git show <tree>: show mode and hash, and handle -r
[git/dscho.git] / my-copy-svn-refs.sh
blobc59eb378df717a60a1ecefdba7c2ff9409ffec1e
1 #!/bin/sh
3 git for-each-ref --format="%(refname)" refs/remotes |
4 sed "s/refs\/remotes\///" |
5 while read ref
6 do
7 git update-ref refs/heads/svn/$ref refs/remotes/$ref
8 done
10 git for-each-ref --format="%(refname)" refs/heads/svn |
11 sed "s/refs\/heads\/svn\///" |
12 while read ref
14 if ! git-rev-parse refs/remotes/$ref > /dev/null 2>&1
15 then
16 git update-ref -d refs/heads/svn/$ref refs/heads/svn/$ref
18 done