about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiExternal.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiExternal.pm')
-rw-r--r--lib/PublicInbox/LeiExternal.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiExternal.pm b/lib/PublicInbox/LeiExternal.pm
index 851715d7..30bb1a45 100644
--- a/lib/PublicInbox/LeiExternal.pm
+++ b/lib/PublicInbox/LeiExternal.pm
@@ -105,7 +105,16 @@ sub get_externals {
         } else {
                 die("`$loc' is ambiguous:\n", map { "\t$_\n" } @m, "\n");
         }
-        ();
+}
+
+sub canonicalize_excludes {
+        my ($lei, $excludes) = @_;
+        my %x;
+        for my $loc (@$excludes) {
+                my @l = get_externals($lei, $loc, 1);
+                $x{$_} = 1 for @l;
+        }
+        \%x;
 }
 
 # returns an anonymous sub which returns an array of potential results