summaryrefslogtreecommitdiff
path: root/update_git_svn
diff options
context:
space:
mode:
Diffstat (limited to 'update_git_svn')
-rwxr-xr-xupdate_git_svn9
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