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

Strange output of git-diff-tree

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 9, 2006, 13:24 UTC
Message-ID
<ebcnml$btf$1@sea.gmane.org>

First (noticed by matled) is that for git-diff-tree with single tree as an argument it outputs fist commit-id of commit given at input. It is not mentioned in documentation and I think totally unnecessary:

1038:jnareb@roke:~/git> git diff-tree --abbrev origin d5dc6a76d49367cddc015e01d2e9aa22e64d7e28 :040000 040000 44fb36d... 1c26294... M Documentation

Second, for some combination of options for it returns "..." instead of 0{40} for file creation. It seems that the culprit is "--find-copies-harder" option:

1043:jnareb@roke:~/git> git rev-list --full-history next | \
 git diff-tree --find-copies-harder -B -C -M -r --full-history --stdin \
 -- gitweb/gitweb.perl gitweb/gitweb.cgi gitweb.cgi | less | grep " A"
:000000 100755 ... 017664b8f440f5ec151cf5653245ee02aefd3db2 A   gitweb.cgi
1047:jnareb@roke:~/git> git rev-list --full-history next | \
 git diff-tree -B -C -M -r --stdin \
 -- gitweb/gitweb.perl gitweb/gitweb.cgi gitweb.cgi | less | grep " A"
:000000 100755 0000000000000000000000000000000000000000 017664b8f440f5ec151cf5653245ee02aefd3db2 A     gitweb.cgi
Third, while it detects that gitweb/gitweb.perl was renamed from 
gitweb/gitweb.cgi:
  [...]  R100   gitweb/gitweb.cgi       gitweb/gitweb.perl
it does not notice that gitweb/gitweb.cgi was gitweb.cgi in 
1130ef362fc8d9c3422c23f5d5a833e93d3f5c13.
All those for git version 1.4.1.1
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Next: Junio C Hamano
Message 1 of 6 in “Strange output of git-diff-tree”
  1. Jakub NarebskiAug 9, 2006
  2. Junio C HamanoAug 9, 2006
  3. Junio C HamanoAug 9, 2006
  4. Junio C HamanoAug 9, 2006
  5. (Unsolicited hint) straightening out stray "git bisect"Junio C Hamano, Aug 9, 2006
  6. Junio C HamanoAug 9, 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.