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

git diff-tree -r -C output inexact sometimes

From
CTCristian Tibirna <tibirna@kde.org>
Date
Sep 21, 2012, 03:20 UTC
Message-ID
<2789023.yr3ihcVOhq@leto>
Hello
A colleague of mine discovered an inconsistency in the functioning of 
git diff-tree -r -C

in specific conditions. As tenuous as these conditions might seem (once you run the script in attachment and analyse its output), please rest assured that it comes from a real-life case.

Running the script in attachment produces a git repository in which were operated a large number of file renames, in which many of the renamed files (in this particular case all) have the same content but different names.

The commit data from the renaming operation (last commit in the script- generated history) is inexactly rendered by the command

git diff-tree -r -C master
The logical result is correctly produced by the more restricted command
git diff-tree -r -M master

IMO for this particular last commit both the above commands should return the same result.

Note that reducing i or j in the generator script attached below makes the bug dissapear.

Thanks a lot for your attention.
-- 
Cristian Tibirna
KDE developer .. tibirna@kde.org .. http://www.kde.org
Next: Jeff King
Message 1 of 2 in “git diff-tree -r -C output inexact sometimes”
  1. Cristian TibirnaSep 21, 2012
  2. Jeff KingSep 21, 2012

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.