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

git diff -B: splitting up complete renames

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 5, 2008, 17:18 UTC
Message-ID
<200801051818.40009.jnareb@gmail.com>
First: in Documentation/diffcore.txt there is an example of broken pair
  diffcore-break: For Splitting Up "Complete Rewrites"
  ----------------------------------------------------
  The second transformation in the chain is diffcore-break, and is
  controlled by the -B option to the git-diff-* commands.  This is
  used to detect a filepair that represents "complete rewrite" and
  break such filepair into two filepairs that represent delete and
  create.  E.g.  If the input contained this filepair:
  ------------------------------------------------
  :100644 100644 bcd1234... 0123456... M file0
  ------------------------------------------------
  and if it detects that the file "file0" is completely rewritten,
  it changes it to:
  ------------------------------------------------
  :100644 000000 bcd1234... 0000000... D file0
  :000000 100644 0000000... 0123456... A file0
  ------------------------------------------------
Shouldn't the last block read for the modern git read:
  ------------------------------------------------
  :100644 000000 bcd1234... 0123456... M99 file0
  ------------------------------------------------
or is it only for '-B' togehter with '-M' or '-C'?
Second: do you have per chance good examples of broken (and perhaps 
merged together) pair, such that it is affected by --diff-filter=B;
with -B<num> or -B<num1>/<num2> parameters needed, if required. COPYING 
and Makefile are one good example, but do you have literal files with 
similar behavior? 
Third: Do "git diff --no-index" (filesystem diff) can show breaking / 
use dissimilarity? I couldn't make it work...
-- 
Jakub Narebski
Poland
Next: Linus Torvalds
Message 1 of 3 in “git diff -B: splitting up complete renames”
  1. Jakub NarebskiJan 5, 2008
  2. Linus TorvaldsJan 5, 2008
  3. Junio C HamanoJan 5, 2008

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.