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

Re: Intensive rename detection

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2008, 01:39 UTC
Message-ID
<7vy700s215.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<216e54900811031718o4cc81294sc0c32be1e71b9372@mail.gmail.com>
"Andrew Arnott" <andrewarnott@gmail.com> writes:
Show 7 quoted lines
> I'm refactoring a library including renaming both files and
> directories.  A few lines of each file are also changed, but they are
> substantially unchanged in content.  I've done a git add to put all my
> changes into the index, but a git status shows that git only detected
> a few of the renames... most of them are delete-add operations.  Is
> there anything I can do to help git recognize the rename so that
> history is preserved across this commit?
There is no need to do anything at commit time.

After making the commit, you can look at it with lower similarity threashold, e.g.

	git show --stat -M1 HEAD
The default behaviour IIRC corresponds to -M5 (that is 50%).
Previous: Andrew ArnottNext: Linus Torvalds
Message 2 of 11 in “Re: Intensive rename detection”
  1. Andrew ArnottNov 4, 2008
  2. Junio C HamanoNov 4, 2008
  3. Linus TorvaldsNov 4, 2008
  4. Linus TorvaldsNov 4, 2008
  5. Jeff KingNov 4, 2008
  6. Andrew ArnottNov 4, 2008
  7. Andrew ArnottNov 4, 2008
  8. Jeff KingNov 4, 2008
  9. Andrew ArnottNov 4, 2008
  10. Björn SteinbrinkNov 4, 2008
  11. Jeff KingNov 5, 2008

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.