git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Treating similar blank lines between hunks as part of the hunks

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 27, 2010, 02:13 UTC
Message-ID
<20100827021310.GA23924@burratino>
In-Reply-To
<AANLkTikZFYSSNMENC5SmKSVt49a+WxXdO0mP=V7Mbi-Q@mail.gmail.com>
Timur Tabi wrote:
Show 29 quoted lines
> git-diff will do this:
> 
>  A
> -B
> -C
> +F
> +G
> 
> -D
> +H
>  E
> 
> Instead, I would prefer it did this:
> 
>  A
> -B
> -C
> -
> -D
> +F
> +G
> +
> +H
> E
> 
> This second diff is easier to read, especially when the number of
> hunks is large, but the size of each hunk is small.  This can happen
> in source code when one function is replaced with a completely
> different function.

Not sure if it would help in your example, but have you tried "git diff --patience"?

Previous: Timur Tabi
Message 2 of 2 in “Treating similar blank lines between hunks as part of the hunks”
  1. Timur TabiAug 26, 2010
  2. Jonathan NiederAug 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.