about summary refs log tree commit homepage
path: root/lib/PublicInbox/MailDiff.pm
DateCommit message (Collapse)
2023-11-30spawn: drop IO layer support from redirects
When setting up stdin for commands, the write_file API is convenient enough nowadays to not be worth having special support with process spawning. When reading stdout of commands, we should probably be using utf8_maybe everywhere since there'll always be legacy encodings in git repos. Reading regular files with :utf8 also results in worse memory management since the file size cannot be used as a hint.
2023-11-29www: mail_diff: add missing </pre> tag
Found by tidy(1) while dealing with other stuff.
2023-11-29www: mail_diff: add final newline before diffing
This gets rid of the "\ No newline at end of file" since it's distracting noise.
2023-11-29www: mail_diff: fix optional address obfuscation
We need to load the proper package and fully-qualify the sub call since we shouldn't load Hval in lei. Some users use this feature even if its broken, oh well :<
2023-11-03spawn: support PerlIO layer in scalar redirects
We have to deal with UTF-8 data for generating patches, so make it easier to pass Perl utf8 data to git, diff, sdiff, etc. to avoid "Wide character" warnings.
2023-11-03io: introduce write_file helper sub
This is pretty convenient way to create files for diff generation in both WWW and lei. The test suite should also be able to take advantage of it.
2023-10-25httpd/async: require IO arg
Callers that want to requeue can call PublicInbox::DS::requeue directly and not go through the convoluted argument handling via PublicInbox::HTTPD::Async->new.
2023-10-25limiter: split out from qspawn
It's slightly better organized this way, especially since `publicinboxLimiter' has its own user-facing config section and knobs. I may use it in LeiMirror and CodeSearchIdx for process management.
2023-04-25mail_diff: show headers differences in WWW /$MSGID/d/ view
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
2023-04-25mail_diff: match ContentHash EOL and EOM behavior more closely
ContentHash currently doesn't convert CRCRLF to LF. Perhaps it should, but for now, have diff behavior match the actual comparison behavior used for dedupe and omit all trailing whitespace for diff.
2023-01-31www: diff: fix encoding problems when showing diff
We need to use the utf8 layer when writing files to be diffed, and utf8::decode the `git diff' output. Furthermore, do the CRLF > LF conversion early to avoid showing CRLF vs LF differences in the diff, since that doesn't matter to MUAs (nor our normal HTML views)
2023-01-30content_digest_dbg: convert to arrayref and limit to lei
Since it's an extremely small class and not subclassed or anything, we'll make it even smaller as an arrayref. We also don't load this for PublicInbox::WWW or anything that runs in public-facing daemons.
2023-01-11www: /$INBOX/$MSGID/d/ to diff reused Message-IDs
To ensure users aren't abusing the ability to reuse Message-IDs, provide a convenient front-end to `lei mail-diff' from WWW. Most of the time it's just list-appended signatures, so I expect this to be useful for /all/ users.
2023-01-11hoist MailDiff and ContentDigestDbg out of lei
These will be reused in the web UI, too.