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

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

From
Jacob Keller <jacob.keller@gmail.com>
Date
Aug 19, 2015, 06:42 UTC
Message-ID
<CA+P7+xrbE9TxzXWwixOv12r0wb=Y17BRxyKFHGTUb0-4Q+wyhA@mail.gmail.com>
In-Reply-To
<CALZPV0Dgmu5fJqQEXwxVvn9Na6jUtvkDbAwY9mAZKeFSMqo8xQ@mail.gmail.com>

Maybe something along the lines of a git-subtree merge. I am not sure how to do that exactly, and I am not sure that it would be worth the trouble to setup for a small case...

On Tue, Aug 18, 2015 at 1:11 PM, Anish Tondwalkar <tondwalkar@virginia.edu> wrote:

Show 13 quoted lines
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Anish Tondwalkar
Message 2 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.