summaryrefslogtreecommitdiffstats
path: root/gitmirror
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2020-06-04 17:08:19 -0700
committerH. Peter Anvin <hpa@zytor.com>2020-06-04 17:08:19 -0700
commit7137a6b0031ac796d6604c9edef4af2f9f0606a5 (patch)
tree804e058c3521d626512586ede1f336897cc289a3 /gitmirror
parentd26cec2980dbd4c9a8134fffa832033fe3abdc11 (diff)
downloadnasmbuild-7137a6b0031ac796d6604c9edef4af2f9f0606a5.tar.gz
nasmbuild-7137a6b0031ac796d6604c9edef4af2f9f0606a5.tar.xz
nasmbuild-7137a6b0031ac796d6604c9edef4af2f9f0606a5.zip
Update to match system changes...
Diffstat (limited to 'gitmirror')
-rwxr-xr-xgitmirror/filter-branches.pl13
-rwxr-xr-xgitmirror/robot.sh2
2 files changed, 11 insertions, 4 deletions
diff --git a/gitmirror/filter-branches.pl b/gitmirror/filter-branches.pl
index 81588cf..cc08869 100755
--- a/gitmirror/filter-branches.pl
+++ b/gitmirror/filter-branches.pl
@@ -1,10 +1,17 @@
#!/usr/bin/perl
-open(GIT, "-|", "git branch -r") or die;
+$rem = shift @ARGV;
+if (defined($rem)) {
+ $remopt = '-r';
+}
+open(GIT, "-|", "git branch $remopt") or die;
%branches = ();
while (<GIT>) {
chomp;
- next if (!m:^[ \*] origin/:);
- s:^[ \*] origin/::;
+ s:^[ \*] ::;
+ if (defined($rem)) {
+ next if (substr($_,0,length($rem)+1) ne $rem.'/');
+ $_ = substr($_,length($rem)+1);
+ }
next if (/ \-\> /);
next if (/^\s*(\#.*|)$/);
next if (/^(HEAD|build)$/);
diff --git a/gitmirror/robot.sh b/gitmirror/robot.sh
index ea76707..0b0b31c 100755
--- a/gitmirror/robot.sh
+++ b/gitmirror/robot.sh
@@ -36,7 +36,7 @@ date=$(date -uR)
mkdir -m 0700 -p $tmpdir
- ( cd "$slave" && "$topdir"/filter-branches.pl ) > branches
+ ( cd "$slave" && "$topdir"/filter-branches.pl origin ) > branches
(
while read branch; do
GIT_DIR="$MASTER" git rev-parse --verify -q "$branch"'^{}' || true