From d8a3e6cbca018b7219870ca52992fd1c4140109f Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sat, 4 Sep 2010 20:48:45 +0300 Subject: update_git_svn: switch to use git show-ref Switch to 'git show-ref' in update_git_svn as well. --- update_git_svn | 9 +++++---- 1 file 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 -- cgit v1.2.3