diff options
author | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-09-04 20:48:45 +0300 |
---|---|---|
committer | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-09-04 20:48:45 +0300 |
commit | d8a3e6cbca018b7219870ca52992fd1c4140109f (patch) | |
tree | 1c3079312d4d6301bf2ae4d36f0d5b7304f03d93 | |
parent | 8ca7d17ada40ad376e5a14f4bd5e32ef03abe11d (diff) |
update_git_svn: switch to use git show-ref
Switch to 'git show-ref' in update_git_svn as well.
-rwxr-xr-x | update_git_svn | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/update_git_svn b/update_git_svn index aaf5f16..552b877 100755 --- a/update_git_svn +++ b/update_git_svn @@ -24,8 +24,10 @@ REPOS="${1:-asterisk dahdi-linux dahdi-tools libpri octapi}" # v[0-9]* - tags # vPR[0-9]* - tags of octapi mirrored_refs() { - ls .git/refs/heads/ | grep '^svn_' - ls .git/refs/tags/ | egrep '^v(|PR)[0-9]\+\.' + { + git show-ref --heads | grep 'heads/svn_' + git show-ref --tags | egrep 'tags/v(|PR)[0-9]+\.' + } | sed -e 's|^.*/\([^/]*\)$|\1|' } mirror_repo() { @@ -39,8 +41,7 @@ mirror_repo() { # A quick snapshot of this repository. To help check if anything changed: remotes_checksum() { - grep . .git/refs/remotes/* .git/refs/remotes/tags/* \ - | sha1sum | cut -d' ' -f1 + git show-ref | grep /remotes/ | sha1sum | cut -d' ' -f1 } for repo in $REPOS; do |