Skip to content

git: add diff-highlight diff pager option#5824

Merged
rycee merged 1 commit intonix-community:masterfrom
aymanbagabas:git-diff-highlight
Sep 14, 2024
Merged

git: add diff-highlight diff pager option#5824
rycee merged 1 commit intonix-community:masterfrom
aymanbagabas:git-diff-highlight

Conversation

@aymanbagabas
Copy link
Copy Markdown
Contributor

@aymanbagabas aymanbagabas commented Sep 12, 2024

Description

This adds a new diff-highlight option to make use of the simple included git diff highlighter that comes with canonical git. diff-highlight is a perl script that high lights the changes in changed lines. This makes it human-readable and easy to see changes in diffs.

For more info, see https://github.com/git/git/blob/master/contrib/diff-highlight/README

This was inspired by #2882 and #2850

Before:
image

After:
image

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

CC/ @rycee @ncfavier

@aymanbagabas aymanbagabas marked this pull request as ready for review September 12, 2024 00:41
This adds a new diff-highlight option to make use of the simple
included git diff highlighter that comes with canonical git.

For more info, see https://github.com/git/git/blob/master/contrib/diff-highlight/README
@rycee rycee force-pushed the git-diff-highlight branch from 1e654eb to 43845d0 Compare September 13, 2024 23:39
@rycee rycee merged commit 43845d0 into nix-community:master Sep 14, 2024
@rycee
Copy link
Copy Markdown
Member

rycee commented Sep 14, 2024

Thanks! Merged to master now 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants