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

Re: Git Rename Detection Bug

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 12, 2023, 23:09 UTC
Message-ID
<xmqqzfzimuv2.fsf@gitster.g>
In-Reply-To
<CABPp-BEtva2WTGQG3Qs4EbZLK_RJC9vuA-2OYxkTPExgowwvqQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 8 quoted lines
>> 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) and 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. 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.

Thanks.
Previous: Elijah NewrenNext: Philip Oakley
Message 7 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. Philip OakleyNov 11, 2023
  6. Elijah NewrenNov 11, 2023
  7. Junio C HamanoNov 12, 2023
  8. Philip OakleyNov 15, 2023
  9. Philip OakleyNov 15, 2023
  10. Elijah NewrenNov 16, 2023
  11. Philip OakleyNov 15, 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.