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

Choosing between "renaming" and "copy"

From
Samuel Tardieu <sam@rfc1149.net>
Date
Mar 12, 2009, 13:01 UTC
Message-ID
<2009-03-12-14-01-15+trackit+sam@rfc1149.net>

I renamed a file in my repository, and made a slightly modified copy of it. It looks like GIT gets confused on which one is the renaming and which one is the copy, and doesn't favour the 100% identical one to be chosen as the renaming.

Not a big deal, but maybe git could be more clever here.
% git commit -m "Split into flash and ram alternatives." 
[stm32-sk 601462c] Split into flash and ram alternatives.
 3 files changed, 3 insertions(+), 2 deletions(-)
 copy Demo/CORTEX_STM32SK_GCC/{stm32f103r8t6.ld => stm32f103r8t6_flash.ld} (100%)
 rename Demo/CORTEX_STM32SK_GCC/{stm32f103r8t6.ld => stm32f103r8t6_ram.ld} (98%)

% git --version git version 1.6.2.rc2.305.g23381

  Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/
Next: Andreas Ericsson
Message 1 of 2 in “Choosing between "renaming" and "copy"”
  1. Samuel TardieuMar 12, 2009
  2. Andreas EricssonMar 12, 2009

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.