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

Moved code detection with `git apply` a la `git blame -C -C`

From
ATAnish Tondwalkar <tondwalkar@virginia.edu>
Date
Aug 18, 2015, 20:11 UTC
Message-ID
<CALZPV0Dgmu5fJqQEXwxVvn9Na6jUtvkDbAwY9mAZKeFSMqo8xQ@mail.gmail.com>

I stashed some changes, then refactored my code to move the function they're in into a new file. Now, I want to apply it to the new file. I know git can figure out this relationship between the files, because `git blame -C -C` can find it, but is there a "more idiomatic" way to apply this diff than to have git spit out a diff, and edit it manually?

-- 
Anish
Next: Jacob Keller
Message 1 of 2 in “Moved code detection with `git apply` a la `git blame -C -C`”
  1. Anish TondwalkarAug 18, 2015
  2. Jacob KellerAug 19, 2015

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.