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

Re: rename tracking and file-name swapping

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Sep 14, 2009, 06:44 UTC
Message-ID
<4AADE655.60503@viscovery.net>
In-Reply-To
<1248088D-85CB-4335-AD8A-07DB5BAD1AAA@users.sf.net>
Yuri D'Elia schrieb:
Show 11 quoted lines
> On 13 Sep 2009, at 20:14, Junio C Hamano wrote:
>> By default, if the pathname that was present in the old version still
>> appears in the new version, that path is not considered as a candiate
>> for rename detection.  Only "X used to be there but is gone" and "Y did
>> not exist but appeared" are paired up and checked if they are similar.
>>
>> Give the command -B option, too, to break the filepair that does not
>> disappear.
> 
> That does the trick. I'm curious, is there any other use for -B besides
> rename handling?
Yes: It can make patches easier to read (just like -M and -C do) if a file
was completely rewritten. For example, look at b9dfe51c with and without
-B, and also note the "dissimilarity index" in the diff header.
-- Hannes
Previous: Yuri D'EliaNext: Nanako Shiraishi
Message 4 of 7 in “rename tracking and file-name swapping”
  1. Yuri D'EliaSep 13, 2009
  2. Junio C HamanoSep 13, 2009
  3. Yuri D'EliaSep 13, 2009
  4. Johannes SixtSep 14, 2009
  5. [Bug?] "diff -B --color" output doesn't show space errorsNanako Shiraishi, Sep 15, 2009
  6. Junio C HamanoSep 15, 2009
  7. diff --whitespace: fix blank lines at endJunio C Hamano, Sep 15, 2009

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.