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

Re: Score in diff-format

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jan 28, 2015, 14:32 UTC
Message-ID
<54C8F306.1000001@drmicha.warpmail.net>
In-Reply-To
<20150128062309.GA29506@glandium.org>
Mike Hommey schrieb am 28.01.2015 um 07:23:
Show 24 quoted lines
> Hi,
> 
> diff-format.txt says this:
> 
>   An output line is formatted this way:
>   (snip)
> 
>   That is, from the left to the right:
> 
>   (snip)
>   . status, followed by optional "score" number.
> 
>   (snip)
>   Status letters C and R are always followed by a score (denoting the
>   percentage of similarity between the source and target of the move or
>   copy), and are the only ones to be so.
>
> As I read this last paragraph, the following is not supposed to happen:
> $ git diff-tree 926b1ec63ee045503f609e88ca445b94c06bd5d7 --abbrev -r -C -B
> 926b1ec63ee045503f609e88ca445b94c06bd5d7
> :100644 100644 81ac702... 7ab0cf4... M087       contrib/subtree/INSTALL
> 
> It however makes sense that it happens, and it looks like a case of the
> documentation being outdated or confusing. Or am I interpreting it wrong?

I'd say it depends on the definition of "so". The documentation is correct if you read "so" as "*always* followed by a score". I guess you read it as "followed by a score".

Percentages with M are not mentioned in diff-format, but they are a consequence of "-B" processing. Maybe we could mention that?

Michael
Previous: Mike HommeyNext: Junio C Hamano
Message 2 of 6 in “Score in diff-format”
  1. Mike HommeyJan 28, 2015
  2. Michael J GruberJan 28, 2015
  3. Junio C HamanoJan 28, 2015
  4. Mike HommeyJan 29, 2015
  5. Junio C HamanoJan 29, 2015
  6. Junio C HamanoJan 28, 2015

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.