user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/4] mail_diff: show headers differences in WWW /$MSGID/d/ view
  2023-04-25 10:50  6% [PATCH 0/4] mail diff updates Eric Wong
@ 2023-04-25 10:50  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-04-25 10:50 UTC (permalink / raw)
  To: meta

Some messages only differ in the To/Cc headers because some
MTAs seem to normalize them.  I was getting confused when I
saw some /d/ endpoints with no visible differences
---
 lib/PublicInbox/ContentDigestDbg.pm | 1 -
 lib/PublicInbox/MailDiff.pm         | 6 +-----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/PublicInbox/ContentDigestDbg.pm b/lib/PublicInbox/ContentDigestDbg.pm
index 5de0ee8a..1e60364f 100644
--- a/lib/PublicInbox/ContentDigestDbg.pm
+++ b/lib/PublicInbox/ContentDigestDbg.pm
@@ -1,6 +1,5 @@
 # Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-# only loaded in lei
 package PublicInbox::ContentDigestDbg; # cf. PublicInbox::ContentDigest
 use v5.12;
 use Data::Dumper;
diff --git a/lib/PublicInbox/MailDiff.pm b/lib/PublicInbox/MailDiff.pm
index d9733ed4..994c7851 100644
--- a/lib/PublicInbox/MailDiff.pm
+++ b/lib/PublicInbox/MailDiff.pm
@@ -7,6 +7,7 @@ use PublicInbox::ContentHash qw(content_digest);
 use PublicInbox::MsgIter qw(msg_part_text);
 use PublicInbox::ViewDiff qw(flush_diff);
 use PublicInbox::GitAsyncCat;
+use PublicInbox::ContentDigestDbg;
 
 sub write_part { # Eml->each_part callback
 	my ($ary, $self) = @_;
@@ -33,11 +34,6 @@ sub dump_eml ($$$) {
 	local $self->{curdir} = $dir;
 	mkdir $dir or die "mkdir($dir): $!";
 	$eml->each_part(\&write_part, $self);
-
-	return if $self->{ctx}; # don't need content_digest noise in WWW UI
-	require PublicInbox::ContentDigestDbg;
-
-	# XXX is this even useful?  perhaps hide it behind a CLI switch
 	open my $fh, '>', "$dir/content_digest" or die "open: $!";
 	my $dig = PublicInbox::ContentDigestDbg->new($fh);
 	content_digest($eml, $dig);

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/4] mail diff updates
@ 2023-04-25 10:50  6% Eric Wong
  2023-04-25 10:50  7% ` [PATCH 3/4] mail_diff: show headers differences in WWW /$MSGID/d/ view Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-04-25 10:50 UTC (permalink / raw)
  To: meta

Some things which I noticed while reading some cross-posted LKML
messages.  These affect the /$INBOX/$MSGID/d/ WWW endpoint as
well as `lei mail-diff'

I'm considering making tweaks to ContentHash to ignore the
name+comment parts of To/Cc headers and only rely on the
lowercased email address itself, too.  That would affect
dedupe across the board for v2 and extindex...

Eric Wong (4):
  mid+contenthash: eliminate needless local variable captures
  mail_diff: match ContentHash EOL and EOM behavior more closely
  mail_diff: show headers differences in WWW /$MSGID/d/ view
  content_digest_dbg: improve display of To:/Cc: diffs

 lib/PublicInbox/ContentDigestDbg.pm |  7 +++++--
 lib/PublicInbox/ContentHash.pm      |  8 +++-----
 lib/PublicInbox/MID.pm              |  6 ++----
 lib/PublicInbox/MailDiff.pm         | 11 ++++-------
 4 files changed, 14 insertions(+), 18 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-04-25 10:50  6% [PATCH 0/4] mail diff updates Eric Wong
2023-04-25 10:50  7% ` [PATCH 3/4] mail_diff: show headers differences in WWW /$MSGID/d/ view Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).