Skip to content

Feature Request: Colorize Diffs in Replies #122

@ericwmackay

Description

@ericwmackay

A frequent use case in looking at code diffs in emails is that you're looking at a reply, not the original email text. In the case of LKML, and other mailing lists with similar style requirements, each line of the previous email in the thread is prepended with "> ". This seems to confuse the diff regex, so all those reply lines are ignored.

Example (the code isn't important):

> ---
>  hw/arm/smmuv3.c | 26 ++++++++++++++++++++++++++
>  hw/arm/virt.c   |  3 ++-
>  2 files changed, 28 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index ab67972353..605de9b721 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -24,6 +24,7 @@
>  #include "hw/qdev-properties.h"
>  #include "hw/qdev-core.h"
>  #include "hw/pci/pci.h"
> +#include "hw/pci/pci_bridge.h"
> +static int smmuv3_pcie_bus(Object *obj, void *opaque)
> +{
> +    DeviceState *d = opaque;

I've tried playing around with the regexes in scripts/content.js:hasDiff() (not even sure if this is the right spot) but haven't found anything that works yet.

Figured this might be a helpful feature for others as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions