One of my main gripes regarding git is that it just generates diffs per line regardless of context or document format. This can be frustrating as it often leads to diffs that cover the end of a function declaration that was not touched and leaves out the end of a function that was just added.

Git supports diff options such as patience and histogram but , even though they mitigate some problems, they are still fallible.

So does anyone know if there is any way to get git to do context- or document format-sensitive diffs?

  • @[email protected]
    link
    fedilink
    English
    1
    edit-2
    11 months ago

    What are you looking for? What use case?

    git config diff.tool allows you to configure and use/launch your own diff tools - GUI or not.
    You can use any context or syntax aware diff tool with that.