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

Re: Rename handling

From
JGJohn Goerzen <jgoerzen@complete.org>
Date
Mar 19, 2007, 19:49 UTC
Message-ID
<slrnevtqaq.1df.jgoerzen@katherina.lan.complete.org>
In-Reply-To
<45FED31B.8070307@midwinter.com>
On 2007-03-19, Steven Grimm <koreth@midwinter.com> wrote:
Show 11 quoted lines
> John Goerzen wrote:
>> 2) For me, a rename is a logical change to the source tree that I want
>>    to be recorded with absolute certainty, not guessed about later.
>>    Sometimes I may make API changes and it is useful to see how module
>>    names changed, with complete precision, later.  I do not want to be
>>    victim to an incorrect guess, which could be possible.
>>   
>
> If you commit your renames separately from your content changes, it'll 
> be unambiguous and you won't have to worry about it. That's what I 
> usually do when this is a concern and it has yet to break for me.

As I have been testing Mercurial and its addremove feature (which does basically what Git is doing), I encountered some situations where this broke, sometimes spectacularly. This generally happened when there were identical files in the source tree, or when there were identical resulting files, or 0-byte files (the extreme pathological case, of course).

Again, sometimes filenames have significance. The presence or absence of 0-byte files can impact what make does, for instance. Not that I advocate for this behavior, but just pointing out that it exists.

I understand what Linus is saying about applying patches from others and agree that what git is doing is nice in this case.

But if most of my work is hacking directly on the code, I am going to know better than the VCS what is being renamed, and would like to record that. Sometimes the filenames are part of the code.

I want the option.
-- John
Previous: Daniel BarkalowNext: Junio C Hamano
Message 29 of 31 in “Rename handling”
  1. John GoerzenMar 19, 2007
  2. Steven GrimmMar 19, 2007
  3. Nicolas PitreMar 19, 2007
  4. Linus TorvaldsMar 19, 2007
  5. Steven GrimmMar 19, 2007
  6. Martin LanghoffMar 19, 2007
  7. Junio C HamanoMar 20, 2007
  8. Linus TorvaldsMar 19, 2007
  9. Robin RosenbergMar 19, 2007
  10. Linus TorvaldsMar 19, 2007
  11. Steven GrimmMar 19, 2007
  12. Steven GrimmMar 19, 2007
  13. Linus TorvaldsMar 19, 2007
  14. Nicolas PitreMar 19, 2007
  15. Daniel BarkalowMar 19, 2007
  16. Andy ParkinsMar 19, 2007
  17. Steven GrimmMar 19, 2007
  18. Jakub NarebskiMar 21, 2007
  19. Johannes SchindelinMar 21, 2007
  20. Steven GrimmMar 21, 2007
  21. Johannes SchindelinMar 21, 2007
  22. Linus TorvaldsMar 21, 2007
  23. Martin LanghoffMar 22, 2007
  24. Jakub NarebskiMar 22, 2007
  25. Martin LanghoffMar 22, 2007
  26. Jakub NarebskiMar 22, 2007
  27. Linus TorvaldsMar 22, 2007
  28. Daniel BarkalowMar 19, 2007
  29. John GoerzenMar 19, 2007
  30. Junio C HamanoMar 19, 2007
  31. Jakub NarebskiMar 21, 2007

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.