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

Re: [idea] File history tracking hints

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 30, 2017, 15:11 UTC
Message-ID
<alpine.DEB.2.21.1.1709301706170.40514@virtualbox>
In-Reply-To
<5fb263a8-d83b-64a7-812f-fd8e3748feb6@jeffhostetler.com>
Hi Jeff,
On Sat, 30 Sep 2017, Jeff Hostetler wrote:
Show 11 quoted lines
> On 9/29/2017 7:12 PM, Johannes Schindelin wrote:
>
> > Therefore, it would be good to have a way to tell Git about renames
> > explicitly so that it does not even need to use its heuristics.
> 
> Agreed.
> 
> It would be nice if every file (and tree) had a permanent GUID
> associated with it.  Then the filename/pathname becomes a property
> of the GUIDs.  Then you can exactly know about moves/renames with
> minimal effort (and no guessing).  But I suppose that ship has sailed...
Yes, that ship has sailed.

But we still could teach Git to understand certain "hints" (that would be really more like "cluebats").

So while we cannot have any GUIDs that are persistent across renames/moves (and which users would probably get wrong all the time by using third-party tools that are not Git-rename aware), we have unique identifiers: the object names.

And we could easily have a lookup table of pairs of object names, telling Git that they were source and target of a rename. When Git would try to figure out whether anything was renamed, it would first look at that lookup table and save itself a lot of work (and opportunity to fail) and short-cut the rename detection.

Ciao, Johannes

Previous: Jeff HostetlerNext: Junio C Hamano
Message 11 of 18 in “[idea] File history tracking hints”
  1. Pavel KretovSep 11, 2017
  2. Stefan BellerSep 11, 2017
  3. Jacob KellerSep 11, 2017
  4. Jeff KingSep 11, 2017
  5. Igor DjordjevicSep 11, 2017
  6. Philip OakleySep 11, 2017
  7. Johannes SchindelinSep 13, 2017
  8. Philip OakleySep 14, 2017
  9. Johannes SchindelinSep 29, 2017
  10. Jeff HostetlerSep 30, 2017
  11. Johannes SchindelinSep 30, 2017
  12. Junio C HamanoOct 1, 2017
  13. Stefan BellerOct 2, 2017
  14. Jeff HostetlerOct 2, 2017
  15. Stefan BellerOct 2, 2017
  16. Jeff HostetlerOct 2, 2017
  17. Junio C HamanoOct 3, 2017
  18. Junio C HamanoOct 3, 2017

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.