chiark / gitweb /
Tests: in drs-git-ext do not pass policy hook argument explicitly - dispatch dir...
[dgit.git] / Debian / Dgit.pm
index e177a83950e0eb6fa8ee516f946fcb312fe00623..1ab65a8f24c6fd1da07d25bd03e1916f81f16f4d 100644 (file)
@@ -15,22 +15,23 @@ BEGIN {
     @ISA         = qw(Exporter);
     @EXPORT      = qw(debiantag server_branch server_ref
                       stat_exists git_for_each_ref
-                      $package_re $branchprefix);
-    %EXPORT_TAGS = ( policyflags => [qw()] );
-    @EXPORT_OK   = qw();
+                      $package_re $component_re $branchprefix);
+    %EXPORT_TAGS = ( policyflags => [qw(NOFFCHECK FRESHREPO)] );
+    @EXPORT_OK   = @{ $EXPORT_TAGS{policyflags} };
 }
 
 our @EXPORT_OK;
 
 our $package_re = '[0-9a-z][-+.0-9a-z]*';
+our $component_re = '[0-9a-zA-Z][-+.0-9a-zA-Z]*';
 our $branchprefix = 'dgit';
 
 # policy hook exit status bits
 # see dgit-repos-server head comment for documentation
 # 1 is reserved in case something fails with `exit 1'
-sub NOFFCHECK () { return 2; }
-sub FRESHREPO () { return 4; }
-# 128 is reserved
+sub NOFFCHECK () { return 0x2; }
+sub FRESHREPO () { return 0x4; }
+# 0x80 is reserved
 
 sub debiantag ($) { 
     my ($v) = @_;