diff options
Diffstat (limited to 'lib/PublicInbox/LeiStore.pm')
-rw-r--r-- | lib/PublicInbox/LeiStore.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index ce66014f..3f33d114 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -20,7 +20,7 @@ use PublicInbox::Eml; use PublicInbox::Import; use PublicInbox::InboxWritable qw(eml_from_path); use PublicInbox::V2Writable; -use PublicInbox::ContentHash qw(content_hash); +use PublicInbox::ContentHash qw(content_hash git_sha); use PublicInbox::MID qw(mids); use PublicInbox::LeiSearch; use PublicInbox::MDA; @@ -508,4 +508,11 @@ sub write_prepare { $lei->{sto} = $self; } +# TODO: support SHA-256 +sub git_blob_id { # called via LEI->git_blob_id + my ($self, $eml) = @_; + $eml->header_set($_) for @PublicInbox::Import::UNWANTED_HEADERS; + git_sha(1, $eml)->hexdigest; +} + 1; |