{"thread":{"id":"26513","subject":"[BUG] Replacing dir with submodule causes weird issues with cherry-pick","startedAt":"2011-02-15T23:19:04Z","lastAt":"2011-02-16T07:05:40Z","messageCount":2,"participants":["Kevin Ballard","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"161234","messageId":"22F69B3E-600C-41AC-911D-B9808A3705E6@inkling.com","threadId":"26513","inReplyTo":null,"subject":"[BUG] Replacing dir with submodule causes weird issues with cherry-pick","fromName":"Kevin Ballard","fromEmail":"kevin@inkling.com","sentAt":"2011-02-15T23:19:04Z","receivedAt":"2011-02-15T23:19:04Z","isPatch":false,"sender":{"key":"kevin@inkling.com","avatar":null},"body":"If I replace a directory in my project with a submodule, then later attempt to\ncherry-pick a commit that predates this change (but does not touch the directory),\ngit always marks the submodule path as containing an created/deleted merge conflict.\nThis makes absolutely no sense, as the change in question has nothing to do with\nthe directory, but git seems convinced that it did.\n\n% mkdir a b\n% cd b\n% git init\n% touch b && git add b && git commit -m 'initial'\n% cd ../a\n% git init\n% touch a && git add a && git commit -m 'initial'\n% mkdir b && touch b/b && git add b/b && git commit -m 'add file b/b'\n% git checkout -b test && touch c && git add c && git commit -m 'add file c'\n% git checkout master\n% git rm -rf b\n% git submodule add file://$PWD/../b b\n% git commit -m 'replace dir b with submodule'\n% # everything is fine at this point\n% git cherry-pick test\n\nAt this point, the spurious merge conflict exists. Even more annoyingly, if I run\ngit mergetool, it actually moves the submodule out of the way, which requires manual\nrepairs after I've aborted the command.\n\nIf instead of cherry-pick I run `git show --pretty=email test | git am` everything\nworks as expected.\n\nThis was reproduced using git version 1.7.4.45.g3c41d, built from the next branch.\n\n-Kevin Ballard"},{"id":"161262","messageId":"4D5B7744.7040409@viscovery.net","threadId":"26513","inReplyTo":"22F69B3E-600C-41AC-911D-B9808A3705E6@inkling.com","subject":"Re: [BUG] Replacing dir with submodule causes weird issues with cherry-pick","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2011-02-16T07:05:40Z","receivedAt":"2011-02-16T07:05:40Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 2/16/2011 0:19, schrieb Kevin Ballard:\n> If I replace a directory in my project with a submodule, then later attempt to\n> cherry-pick a commit that predates this change (but does not touch the directory),\n> git always marks the submodule path as containing an created/deleted merge conflict.\n\nKnown breakage; t3030 tests for it. 7d82b06d talks about a file/directory\nconflict, though.\n\n-- Hannes\n"}]}