git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:59 UTC

Re: Git Rename Detection Bug

From
Philip Oakley <philipoakley@iee.email>
Date
Nov 15, 2023, 15:35 UTC
Message-ID
<dc2b2553-419b-4d93-9b72-204838a6011f@iee.email>
In-Reply-To
<xmqqzfzimuv2.fsf@gitster.g>
On 12/11/2023 23:09, Junio C Hamano wrote:
Show 13 quoted lines
> Elijah Newren <newren@gmail.com> writes:
> 
>>> Could I suggest that we are missing a piece of terminology, to wit,
>>> BLOBSAME. It's a compatriot to TREESAME, as used in `git log` for
>>> history simplification (based on a tree's pathspec, most commonly a
>>> commit's top level path).
>>
>> We could add it, but I'm not sure how it helps.  We already had 'exact
>> rename' which seems to fit the bill as well, and 'blob' is something
>> someone new to Git is unlikely to know.
> 
> Also, as Philip said, TREESAME is a concept foreign to rename
> detection codepath.  It is a property of a commit (not a tree)
That (property of a commit?) wasn't really obvious to me.

I'd always thought of it as a comparison between two trees, commonly those associated with two commits. Though it could also be thought of as the operation "TREESAME to" that binds in the second tree.

 and
Show 7 quoted lines
> tells us if it has the same tree object as its relevant parents (in
> which case it can be simplified away if it is a merge).  I do not
> mind rename codepath using a jargon (or two) to express "in trees A
> and B, this subtree of A records the same tree object as a subtree
> of B at a different path (i.e., the contents of these two subtrees
> at different paths are the same)" but the word used to express that
> should not be TREESAME to avoid confusion.

Maybe it's that the explanation of TREESAME in rev-list-options.txt#L419-L436 [1] has a similar set of confusions about how subtrees are considered and the path v filename confusions.

  And the other word to
> express "this path in tree A records a blob object that is identical
> to this other path in tree B" should not be BLOBSAME, as the word
> strongly hints it is somehow related to TREESAME.
Yep. Naming is hard.
> 
> Thanks.
> 
> 
Philip

[1] https://github.com/git/git/blob/master/Documentation/rev-list-options.txt#L419-L436

Previous: Philip OakleyNext: Philip Oakley
Message 9 of 13 in “Git Rename Detection Bug”
  1. Jeremy PridmoreNov 6, 2023
  2. Elijah NewrenNov 7, 2023
  3. Jeremy PridmoreNov 10, 2023
  4. Elijah NewrenNov 11, 2023
  5. Elijah NewrenNov 11, 2023
  6. Philip OakleyNov 11, 2023
  7. Junio C HamanoNov 12, 2023
  8. Philip OakleyNov 15, 2023
  9. Philip OakleyNov 15, 2023
  10. Philip OakleyNov 15, 2023
  11. Elijah NewrenNov 16, 2023
  12. Elijah NewrenDec 24, 2023
  13. Philip OakleyDec 28, 2023

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.