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

Re: git confused by rename

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 10, 2008, 15:44 UTC
Message-ID
<7vabdcmp4n.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<fb6605670810100741k7cff25c7y4df66834cf7482a0@mail.gmail.com>
"Michael P. Soulier" <msoulier@digitaltorque.ca> writes:
> #       renamed:    templates/scrc/index.html -> templates/scrc/cres_taps.html
> #       modified:   templates/scrc/index.html
>
> Looking at the last two lines here, there is obviously an issue.
I am puzzled.

Looking at wt-status.c "renamed: A -> B" will be shown only when A and B are similar enough *and* there is no A remaining in the final result, and in such a case, "modified: A" should not be shown. Because git does not care how you created B (IOW, it does not matter if B was typed from scratch with copying and pasting, or created by copying and editing), the "renamed: A -> B" entry itself is not surprising nor look like a bug at all, but its presense at the same time as "modified: A" does feel very fishy.

Previous: Michael P. SoulierNext: Junio C Hamano
Message 2 of 6 in “git confused by rename”
  1. Michael P. SoulierOct 10, 2008
  2. Junio C HamanoOct 10, 2008
  3. Junio C HamanoOct 10, 2008
  4. Björn SteinbrinkOct 10, 2008
  5. Michael P. SoulierOct 10, 2008
  6. git-status: Detect copies as well as renamesBjörn Steinbrink, Oct 10, 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.