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

Re: [RFH] xdiff shows trivially redundant diff.

From
DLDavide Libenzi <davidel@xmailserver.org>
Date
Apr 2, 2006, 17:35 UTC
Message-ID
<Pine.LNX.4.64.0604021035130.30097@alien.or.mcafeemobile.com>
In-Reply-To
<7v4q1cmj7l.fsf@assigned-by-dhcp.cox.net>
On Sun, 2 Apr 2006, Junio C Hamano wrote:
Show 37 quoted lines
> $ git diff-tree -p 52e8a6^2 52d8a6 -- git-fetch.sh
>
> shows a change that trivially is redundant, like this:
>
>    diff --git a/git-fetch.sh b/git-fetch.sh
>    index b4325d9..de4f011 100755
>    --- a/git-fetch.sh
>    +++ b/git-fetch.sh
>    @@ -320,7 +320,7 @@ fetch_main () {
>         ( : subshell because we muck with IFS
>           IFS="    $LF"
>           (
>    -         git-fetch-pack $exec $keep "$remo...
>    +         git-fetch-pack $exec $keep --thin...
>           ) |
>           while read sha1 remote_name
>           do
>    @@ -367,21 +367,26 @@ fetch_main "$reflist"
>
>     # automated tag following
>     case "$no_tags$tags" in
>    -'')
>    -       taglist=$(IFS=" " &&
>    -       git-ls-remote $upload_pack --tags "$remote" |
>    ...
>    -       done)
>    +'')
>    +       case "$reflist" in
>    +       *:refs/*)
>    ...
>
> Notice the first '-' and '+' lines of second hunk are identical?
>
> There is another interesting thing.  This is running diff
> between 52e8a6^2 and 52d8a6 blobs, but if I change them slightly
> so that the first hunk is not different, then this anomaly
> disappears.
Could you send me the two files that creates the above diff?
- Davide
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 17 in “[RFH] xdiff shows trivially redundant diff.”
  1. Junio C HamanoApr 2, 2006
  2. Davide LibenziApr 2, 2006
  3. Junio C HamanoApr 2, 2006
  4. Linus TorvaldsApr 2, 2006
  5. Davide LibenziApr 2, 2006
  6. Davide LibenziApr 2, 2006
  7. Linus TorvaldsApr 3, 2006
  8. Davide LibenziApr 3, 2006
  9. Linus TorvaldsApr 3, 2006
  10. Davide LibenziApr 3, 2006
  11. Junio C HamanoApr 3, 2006
  12. Davide LibenziApr 3, 2006
  13. Davide LibenziApr 3, 2006
  14. Junio C HamanoApr 3, 2006
  15. Davide LibenziApr 3, 2006
  16. Davide LibenziApr 3, 2006
  17. Junio C HamanoApr 4, 2006

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.