diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-22 08:14:19 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-22 08:14:19 +0000 |
commit | 641d171a6bcb1f4ebb87b317f8eaca825da501c1 (patch) | |
tree | 350d0de7980b345f639b94913edc5d21f5f7c92e /lib/PublicInbox/V2Writable.pm | |
parent | 4c5fa84eec85cf406cbcd900f92dc478ed14ea30 (diff) | |
download | public-inbox-641d171a6bcb1f4ebb87b317f8eaca825da501c1.tar.gz |
We want to make it clear to the code and DEBUG_DIFF users that we do not introduce messages with unsuitable headers into public archives.
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 605f6887..44b5528f 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -223,6 +223,12 @@ sub remove { my $mm = $skel->{mm}; my $removed; my $mids = mids($mime->header_obj); + + # We avoid introducing new blobs into git since the raw content + # can be slightly different, so we do not need the user-supplied + # message now that we have the mids and content_id + $mime = undef; + foreach my $mid (@$mids) { $srch->reopen->each_smsg_by_mid($mid, sub { my ($smsg) = @_; @@ -430,6 +436,7 @@ sub diff ($$$) { print $ah $cur->as_string or die "print: $!"; close $ah or die "close: $!"; my ($bh, $bn) = tempfile('email-new-XXXXXXXX'); + PublicInbox::Import::drop_unwanted_headers($new); print $bh $new->as_string or die "print: $!"; close $bh or die "close: $!"; my $cmd = [ qw(diff -u), $an, $bn ]; |