aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2017-06-29 14:12:26 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2017-06-29 14:12:26 -0700
commit454205ea080840e607d8a792f995a7a9ecc49f2c (patch)
treea0cfe30867547b99e1c062e66b9df9d6d959e2f1 /src/lib/Gitolite/Conf/Sugar.pm
parentMerge tag 'v3.6.6' (diff)
parentadd example PRE_GIT code for blocking access (IP-check) (diff)
downloadgitolite-gentoo-master.tar.gz
gitolite-gentoo-master.tar.bz2
gitolite-gentoo-master.zip
Merge remote-tracking branch 'upstream/master'HEADgitolite-gentoo-3.6.6.1master
Diffstat (limited to 'src/lib/Gitolite/Conf/Sugar.pm')
-rw-r--r--src/lib/Gitolite/Conf/Sugar.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/Gitolite/Conf/Sugar.pm b/src/lib/Gitolite/Conf/Sugar.pm
index 986494b..68ad728 100644
--- a/src/lib/Gitolite/Conf/Sugar.pm
+++ b/src/lib/Gitolite/Conf/Sugar.pm
@@ -68,6 +68,7 @@ sub sugar {
$lines = owner_desc($lines);
$lines = name_vref($lines);
$lines = role_names($lines);
+ $lines = skip_block($lines);
return $lines;
}
@@ -179,5 +180,21 @@ sub role_names {
return \@ret;
}
+sub skip_block {
+ my $lines = shift;
+
+ my @out = ();
+ for (@$lines) {
+ my $skip = 0;
+ $skip = 1 if /^= *begin testconf$/;
+ # add code for other types of blocks here as needed
+
+ next if $skip .. /^= *end$/;
+ push @out, $_;
+ }
+
+ return \@out;
+}
+
1;