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

git-cherry-pick no longer detecting moved files in 1.5.3.4

From
RQRichard Quirk <richard.quirk@gmail.com>
Date
Oct 16, 2007, 22:17 UTC
Message-ID
<cac9e4380710161517m64ba737dj8711a6ce59b1b69@mail.gmail.com>

I recently upgraded from git 1.5.3 to 1.5.3.4 and my cherry picks from path/to/file.c to path/to/subdir/file.c stopped working. The error being:

CONFLICT (delete/modify): path/to/file.c deleted in HEAD and modified in 9f944cb... <commit msg> Version 9f944cb... <commit msg> of path/to/file.c left in tree.

The history of my project is that I had an extra sub directory that I got rid of, moving files up a level on the master branch but this extra directory is still present on a "release" branch. It is to this release branch that I am cherry picking changes from the master one. This worked fine in 1.5.4.

I tracked the change that scuppered my cherry picking down to this fix by Linus for rename detection limits: http://git.kernel.org/?p=git/git.git;a=commit;h=0024a54923a12

Seems like I hit the limit there - the moving changed the location of about 140 files. I tried setting diff.renamelimit to -1 but to no avail. Is it that the config value only applies for git-diff, not git-cherry-pick? (Also, minor thing this, but the docs for git-config says it is diff.renameLimit but diff.c uses diff.renamelimit.) Recompiling with diff_rename_limit_default set to -1 in diff.c "fixes" the cherry picking, but isn't ideal. Anyone have any ideas for a better workaround/fix?

thanks, Richard

Next: Michele Ballabio
Message 1 of 6 in “git-cherry-pick no longer detecting moved files in 1.5.3.4”
  1. Richard QuirkOct 16, 2007
  2. Michele BallabioOct 16, 2007
  3. Richard QuirkOct 17, 2007
  4. Shawn O. PearceOct 17, 2007
  5. Richard QuirkOct 17, 2007
  6. Shawn O. PearceOct 17, 2007

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.