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

Re: Handling renames.

From
Junio C Hamano <junkio@cox.net>
Date
Oct 22, 2005, 02:10 UTC
Message-ID
<7vbr1is3m4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051022015109.GO30889@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
Show 8 quoted lines
>> I'm convinced that git handles renames better than any other SCM ever. 
>> Exactly because we figure it out when it matters.
>
> It matters at least every time you show per-file history and every time
> you merge cross the rename. I think that can be both pretty common if
> you ever do the rename. That means you can do an expensive guess
> every time you hit that, and the guess can get it wrong, in which case
> there is no way around that and you lose.

I think it is OK for the higher level layer (like your single-file-history follower) to use what you outlined with "edges", as either a hint/request from the user and/or a cache of what the expensive and unreliable thing figured out.

I however do not necessarily think adding the "edges" information as an optional second item on "parent " line in a commit is a good idea. Rather, treating the set of "edges" just like we treat the grafts feel more appropriate to me. IOW, create .git/info/edges and keep your edge information there.

Previous: Petr BaudisNext: Petr Baudis
Message 8 of 20 in “git-rev-list: add "--dense" flag”
  1. Linus TorvaldsOct 21, 2005
  2. Linus TorvaldsOct 21, 2005
  3. Linus TorvaldsOct 21, 2005
  4. Petr BaudisOct 22, 2005
  5. Handling renames.Petr Baudis, Oct 22, 2005
  6. Linus TorvaldsOct 22, 2005
  7. Petr BaudisOct 22, 2005
  8. Junio C HamanoOct 22, 2005
  9. Petr BaudisOct 22, 2005
  10. Linus TorvaldsOct 22, 2005
  11. Linus TorvaldsOct 22, 2005
  12. Petr BaudisOct 22, 2005
  13. Linus TorvaldsOct 22, 2005
  14. Junio C HamanoOct 22, 2005
  15. Linus TorvaldsOct 22, 2005
  16. Jonas FonsecaOct 25, 2005
  17. Linus TorvaldsOct 25, 2005
  18. Jonas FonsecaOct 25, 2005
  19. Linus TorvaldsOct 25, 2005
  20. Linus TorvaldsOct 25, 2005

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.