{"thread":{"id":"10325","subject":"git-cherry-pick no longer detecting moved files in 1.5.3.4","startedAt":"2007-10-16T22:17:00Z","lastAt":"2007-10-17T07:55:13Z","messageCount":6,"participants":["Richard Quirk","Michele Ballabio","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"56135","messageId":"cac9e4380710161517m64ba737dj8711a6ce59b1b69@mail.gmail.com","threadId":"10325","inReplyTo":null,"subject":"git-cherry-pick no longer detecting moved files in 1.5.3.4","fromName":"Richard Quirk","fromEmail":"richard.quirk@gmail.com","sentAt":"2007-10-16T22:17:00Z","receivedAt":"2007-10-16T22:17:00Z","isPatch":false,"sender":{"key":"richard.quirk@gmail.com","avatar":null},"body":"I recently upgraded from git 1.5.3 to 1.5.3.4 and my cherry picks from\npath/to/file.c to path/to/subdir/file.c stopped working. The error being:\n\nCONFLICT (delete/modify): path/to/file.c deleted in HEAD and modified\nin 9f944cb... <commit msg> Version 9f944cb... <commit msg> of\npath/to/file.c left in tree.\n\nThe history of my project is that I had an extra sub directory that I\ngot rid of, moving files up a level on the master branch but this\nextra directory is still present on a \"release\" branch. It is to this\nrelease branch that I am cherry picking changes from the master one.\nThis worked fine in 1.5.4.\n\nI tracked the change that scuppered my cherry picking down to this fix\nby Linus for rename detection limits:\nhttp://git.kernel.org/?p=git/git.git;a=commit;h=0024a54923a12\n\nSeems like I hit the limit there - the moving changed the location of\nabout 140 files. I tried setting diff.renamelimit to -1 but to no\navail. Is it that the config value only applies for git-diff, not\ngit-cherry-pick? (Also, minor thing this, but the docs for git-config\nsays it is diff.renameLimit but diff.c uses diff.renamelimit.)\nRecompiling with diff_rename_limit_default set to -1 in diff.c \"fixes\"\nthe cherry picking, but isn't ideal. Anyone have any ideas for a\nbetter workaround/fix?\n\nthanks,\nRichard\n"},{"id":"56137","messageId":"200710170035.12482.barra_cuda@katamail.com","threadId":"10325","inReplyTo":"cac9e4380710161517m64ba737dj8711a6ce59b1b69@mail.gmail.com","subject":"Re: git-cherry-pick no longer detecting moved files in 1.5.3.4","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2007-10-16T22:35:12Z","receivedAt":"2007-10-16T22:35:12Z","isPatch":false,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"On Wednesday 17 October 2007, Richard Quirk wrote:\n> I tried setting diff.renamelimit to -1 but to no\n> avail.\n\nIt should be \ndiff.renamelimit = 0\n\nto set the \"unlimited\" limit.\n"},{"id":"56166","messageId":"20071017005856.GK13801@spearce.org","threadId":"10325","inReplyTo":"cac9e4380710161517m64ba737dj8711a6ce59b1b69@mail.gmail.com","subject":"Re: git-cherry-pick no longer detecting moved files in 1.5.3.4","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-17T00:58:56Z","receivedAt":"2007-10-17T00:58:56Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Richard Quirk <richard.quirk@gmail.com> wrote:\n> (Also, minor thing this, but the docs for git-config\n> says it is diff.renameLimit but diff.c uses diff.renamelimit.)\n\nSomeone else already responded about how to set this limit, but\nI wanted to clarify what the docs vs. the code were doing here.\n\nThe docs use camelCase as it is prettier to read multiple words\nthat useCamelCase than alllowercaselikethis.  Internally when we\nparse your config file we lowercase the entire string so that the\ncode can worry only about the lowercase variant.  That's why you\nsee it all lowercase in diff.c, but the docs suggest you to use\nthe camelCase format.\n\n-- \nShawn.\n"},{"id":"56213","messageId":"cac9e4380710170018p26ae8935xc4d3218f4db5411d@mail.gmail.com","threadId":"10325","inReplyTo":"200710170035.12482.barra_cuda@katamail.com","subject":"Re: git-cherry-pick no longer detecting moved files in 1.5.3.4","fromName":"Richard Quirk","fromEmail":"richard.quirk@gmail.com","sentAt":"2007-10-17T07:18:25Z","receivedAt":"2007-10-17T07:18:25Z","isPatch":false,"sender":{"key":"richard.quirk@gmail.com","avatar":null},"body":"On 10/17/07, Michele Ballabio <barra_cuda@katamail.com> wrote:\n> On Wednesday 17 October 2007, Richard Quirk wrote:\n> > I tried setting diff.renamelimit to -1 but to no\n> > avail.\n>\n> It should be\n> diff.renamelimit = 0\n>\n> to set the \"unlimited\" limit.\n>\n\nThis doesn't work either. Cherry picking is not triggering the loading\nof this value at all.\n\nThis is because git-cherry-pick turns into a git-merge-recursive. This\ncalls get_renames() in merge-recursive.c, which calls diff_setup,\nsetting the renamelimit to -1, then calls diff_setup_done(), which\nsets the renamelimit to diff_rename_limit_default since rename_limit\nwas < 0. diff_rename_limit_default is the hard-coded value of 100. At\nno point does merge-recursive call git_diff_ui_config() in diff.c that\nreads in the diff.renamelimit user defined value, so in the end the\ncherry pick uses the hardcoded value of 100.\n"},{"id":"56216","messageId":"20071017073357.GA13801@spearce.org","threadId":"10325","inReplyTo":"cac9e4380710170018p26ae8935xc4d3218f4db5411d@mail.gmail.com","subject":"Re: git-cherry-pick no longer detecting moved files in 1.5.3.4","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-17T07:33:57Z","receivedAt":"2007-10-17T07:33:57Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Richard Quirk <richard.quirk@gmail.com> wrote:\n> On 10/17/07, Michele Ballabio <barra_cuda@katamail.com> wrote:\n> > It should be\n> > diff.renamelimit = 0\n> >\n> > to set the \"unlimited\" limit.\n> >\n> \n> This doesn't work either. Cherry picking is not triggering the loading\n> of this value at all.\n> \n> This is because git-cherry-pick turns into a git-merge-recursive. This\n> calls get_renames() in merge-recursive.c, which calls diff_setup,\n> setting the renamelimit to -1, then calls diff_setup_done(), which\n> sets the renamelimit to diff_rename_limit_default since rename_limit\n> was < 0. diff_rename_limit_default is the hard-coded value of 100. At\n> no point does merge-recursive call git_diff_ui_config() in diff.c that\n> reads in the diff.renamelimit user defined value, so in the end the\n> cherry pick uses the hardcoded value of 100.\n\nThat's an \"old\" bug.  Lars Hjemli fixed this in df3a02f612 back on\nSept 25th.  You can get the fix from either Junio's or my git tree\nin the master branch.\n\n-- \nShawn.\n"},{"id":"56219","messageId":"cac9e4380710170055t3853979by9d12a9a2f989f9b9@mail.gmail.com","threadId":"10325","inReplyTo":"20071017073357.GA13801@spearce.org","subject":"Re: git-cherry-pick no longer detecting moved files in 1.5.3.4","fromName":"Richard Quirk","fromEmail":"richard.quirk@gmail.com","sentAt":"2007-10-17T07:55:13Z","receivedAt":"2007-10-17T07:55:13Z","isPatch":false,"sender":{"key":"richard.quirk@gmail.com","avatar":null},"body":"On 10/17/07, Shawn O. Pearce <spearce@spearce.org> wrote:\n>\n> That's an \"old\" bug.  Lars Hjemli fixed this in df3a02f612 back on\n> Sept 25th.  You can get the fix from either Junio's or my git tree\n> in the master branch.\n\nYes, with that fix setting the diff.renamelimit config value to 0\nreally does work. Thanks!\n"}]}