Include unified diff in checkin alert emails
By wyoung on 2018-08-12 03:04:14 [link]
When a checkin alert message is created, it should include a unified diff of the change unless the change is very large. (32 kB or so.) This lets the receiver avoid a trip to the remote server in many cases.
If the message would be too large with the diff, include a link to the diff page in the server's Fossil UI instead.
This limit could be configurable, with 0 giving the current behavior.
Yes, this would be pretty cool. I remember many options were provided to drh when he was soliciting input on recommendations for the check-in email notifications. The implemented version, IMO, works pretty well for sqlite and fossil, but I could see how including more information could be a nice feature.
So you're saying <= 32 kB, include unified diffs - regardless of a count of files changed?
By wyoung on 2018-08-12 06:32:56 in reply to previous
The last time I saw this feature, it was with Subversion as configured at Gna!, a free source code hosting site that has since gone belly-up. (And that's why we like self-hosting and DVCSes!) 32 kB is my vague recollection of the limit there, but really, I'm just throwing the number out there as a starting point for thinking about this feature.
I don't think I'd get too upset with any value up to about 5 MB, and that just because it's likely to run you into message size limits on many email servers.
To argue that keeping this limit low saves Fossil server bandwidth is to claim that you've got many users signed up for checkin messages who wouldn't then go to the provided Fossil UI link to view the diff if Fossil didn't include it in the email body. Otherwise, it's the same bandwidth either way.