{"thread":{"id":"37012","subject":"Trouble merging renamed but identical files - CONFLICT (rename/rename)","startedAt":"2014-06-27T20:47:25Z","lastAt":"2014-06-30T01:42:24Z","messageCount":12,"participants":["Jason Pyeron","Phil Hord"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"245098","messageId":"B901ECBC8F944F039AFD6B53929FF18C@black","threadId":"37012","inReplyTo":null,"subject":"Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2014-06-27T20:47:25Z","receivedAt":"2014-06-27T20:47:25Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"There are two identical files from the same original parent, but both were\nrenamed in their own branches. One branch moved the file to a new folder, the\nother renamed the file in the same folder.\n\nSteps to reproduce the issue:\ngit init\ngit fetch https://github.com/pdinc-oss/CipherShed.git\ngit fetch https://github.com/srguglielmo/CipherShed.git\ngit checkout -b test b60070f4d0879e277f44d174a163bbb292325fea\ngit merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n\nCONFLICT (rename/rename): Rename \"TrueCrypt.sln\"->\"src/TrueCrypt.sln\" in branch\n\"HEAD\" rename \"TrueCrypt.sln\"->\"CipherShed.sln\" in\n\"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n\ngit reset --hard b60070f4d0879e277f44d174a163bbb292325fea\ngit mv src/TrueCrypt.sln src/CipherShed.sln\ngit commit -m 'renamed to be congruent with a0c84ff'\ngit merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n\nSill get a CONFLICT (rename/rename): Rename\n\"TrueCrypt.sln\"->\"src/CipherShed.sln\" in branch \"HEAD\" rename\n\"TrueCrypt.sln\"->\"CipherShed.sln\" in \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n\nI will have many more to come, any suggestions?\n\nRepos:\n\nhttps://github.com/srguglielmo/CipherShed/commit/1ca13ed2271d60ba93d40bcc8db17ce\nd8545f172\n\nhttps://github.com/pdinc-oss/CipherShed/commit/b60070f4d0879e277f44d174a163bbb29\n2325fea\n\n\n\n--\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-                                                               -\n- Jason Pyeron                      PD Inc. http://www.pdinc.us -\n- Principal Consultant              10 West 24th Street #100    -\n- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -\n-                                                               -\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nThis message is copyright PD Inc, subject to license 20080407P00.\n"},{"id":"245101","messageId":"CABURp0rFCxxpiQhRYXmN5eBnKhyyOeuFSTj0V1tGZJSNea5iEA@mail.gmail.com","threadId":"37012","inReplyTo":"B901ECBC8F944F039AFD6B53929FF18C@black","subject":"Re: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2014-06-27T21:46:20Z","receivedAt":"2014-06-27T21:46:20Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Fri, Jun 27, 2014 at 4:47 PM, Jason Pyeron <jpyeron@pdinc.us> wrote:\n> There are two identical files from the same original parent, but both were\n> renamed in their own branches. One branch moved the file to a new folder, the\n> other renamed the file in the same folder.\n\nYou have not stated what you think the issue is.  You have only stated\nthe setup.\n\n\nI suppose you want Git to merge without conflict in the end, though,\nbased on your script.  Is that right?\n\n\n> Steps to reproduce the issue:\n> git init\n> git fetch https://github.com/pdinc-oss/CipherShed.git\n> git fetch https://github.com/srguglielmo/CipherShed.git\n> git checkout -b test b60070f4d0879e277f44d174a163bbb292325fea\n> git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n>\n> CONFLICT (rename/rename): Rename \"TrueCrypt.sln\"->\"src/TrueCrypt.sln\" in branch\n> \"HEAD\" rename \"TrueCrypt.sln\"->\"CipherShed.sln\" in\n> \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n\nGit seems to be doing the correct thing here.\n\n\n> git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n> git mv src/TrueCrypt.sln src/CipherShed.sln\n> git commit -m 'renamed to be congruent with a0c84ff'\n> git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n>\n> Sill get a CONFLICT (rename/rename): Rename\n> \"TrueCrypt.sln\"->\"src/CipherShed.sln\" in branch \"HEAD\" rename\n> \"TrueCrypt.sln\"->\"CipherShed.sln\" in \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n\nGit seems to be doing the correct thing here, too.\n\n> I will have many more to come, any suggestions?\n\nMaybe you meant to move the renamed file to the same folder where it\nexists in the merge target.  I do not get a conflict when I do that.\n\n   git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n   git mv src/TrueCrypt.sln CipherShed.sln\n   git commit -m 'renamed to be congruent with a0c84ff'\n   git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n\nNo conflict (on that file, anyway).\n\nRegards,\nPhil\n\n> This message is copyright PD Inc, subject to license 20080407P00.\n\np.s. Maybe you should remove this copyright threat in the future when\nyou are writing to an open source community seeking help.\n"},{"id":"245103","messageId":"073A89A2555A4CD6AB28AF42078575ED@black","threadId":"37012","inReplyTo":"CABURp0rFCxxpiQhRYXmN5eBnKhyyOeuFSTj0V1tGZJSNea5iEA@mail.gmail.com","subject":"RE: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2014-06-27T22:39:26Z","receivedAt":"2014-06-27T22:39:26Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"> -----Original Message-----\n> From: Phil Hord [mailto:phil.hord@gmail.com] \n> Sent: Friday, June 27, 2014 17:46\n> To: Jason Pyeron\n> Cc: git\n> Subject: Re: Trouble merging renamed but identical files - \n> CONFLICT (rename/rename)\n> \n> On Fri, Jun 27, 2014 at 4:47 PM, Jason Pyeron \n> <jpyeron@pdinc.us> wrote:\n> > There are two identical files from the same original \n> parent, but both were\n> > renamed in their own branches. One branch moved the file to \n> a new folder, the\n> > other renamed the file in the same folder.\n> \n> You have not stated what you think the issue is.  You have only stated\n> the setup.\n\nThanks, I could have said it better. \n\nI think that git should understand that I have moved a file in path only (the\ntree object containing the file's entry change, but not the entry it self) and\nthat the branch from which I want to merge back (with common ancestry) has\nrenamed the file in the same path ( the tree object is unchanged, but the entry\nis) such that the object is re-parented and renamed in that path.\n\nHow can this be done in git or if it cannot what are the chalenges to patching\ngit for this issue.\n\ngit cat-file -p b60070f4d0879e277f44d174a163bbb292325fea # tree\nd8df83fc6714aab1fc1df061fcb03410e1dab1e5\ngit cat-file -p d8df83fc6714aab1fc1df061fcb03410e1dab1e5 # 040000 tree\n68bb8a223284e0f5057421217a5965128bf1d51a    src\ngit cat-file -p 68bb8a223284e0f5057421217a5965128bf1d51a # 100644 blob\n25c7d3b12bced67046359ba1e7945f82a2640147    TrueCrypt.sln\n\ngit cat-file -p a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68 # tree\n7f82a6c46f19931c3c40d44dc196cbfab7feaa72\ngit cat-file -p 7f82a6c46f19931c3c40d44dc196cbfab7feaa72 # 100644 blob\n25c7d3b12bced67046359ba1e7945f82a2640147    CipherShed.sln\n\n> \n> \n> I suppose you want Git to merge without conflict in the end, though,\n> based on your script.  Is that right?\n> \n> \n> > Steps to reproduce the issue:\n> > git init\n> > git fetch https://github.com/pdinc-oss/CipherShed.git\n> > git fetch https://github.com/srguglielmo/CipherShed.git\n> > git checkout -b test b60070f4d0879e277f44d174a163bbb292325fea\n> > git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> >\n> > CONFLICT (rename/rename): Rename \n> \"TrueCrypt.sln\"->\"src/TrueCrypt.sln\" in branch\n> > \"HEAD\" rename \"TrueCrypt.sln\"->\"CipherShed.sln\" in\n> > \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n> \n> Git seems to be doing the correct thing here.\n> \n> \n> > git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n> > git mv src/TrueCrypt.sln src/CipherShed.sln\n> > git commit -m 'renamed to be congruent with a0c84ff'\n> > git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> >\n> > Sill get a CONFLICT (rename/rename): Rename\n> > \"TrueCrypt.sln\"->\"src/CipherShed.sln\" in branch \"HEAD\" rename\n> > \"TrueCrypt.sln\"->\"CipherShed.sln\" in \n> \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n> \n> Git seems to be doing the correct thing here, too.\n> \n> > I will have many more to come, any suggestions?\n> \n> Maybe you meant to move the renamed file to the same folder where it\n> exists in the merge target.  I do not get a conflict when I do that.\n\nAre you saying I should git mv src/TrueCrypt.sln CipherShed.sln ?\n\nThen it will be in the wrong path as intended.\n\n> \n>    git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n>    git mv src/TrueCrypt.sln CipherShed.sln\n>    git commit -m 'renamed to be congruent with a0c84ff'\n>    git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> \n> No conflict (on that file, anyway).\n\nAgreed, but not the desired end state.\n\n--\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-                                                               -\n- Jason Pyeron                      PD Inc. http://www.pdinc.us -\n- Principal Consultant              10 West 24th Street #100    -\n- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -\n-                                                               -\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nThis message is copyright PD Inc, subject to license 20080407P00.\n\n \n"},{"id":"245109","messageId":"CEAC9BE9F83B4CD0AFD73BBAC8A54232@black","threadId":"37012","inReplyTo":"66A60DA77398CD439FA676CEF593977D52477A@exchange.1.internal.pdinc.us","subject":"RE: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2014-06-28T00:42:19Z","receivedAt":"2014-06-28T00:42:19Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"> -----Original Message-----\n> From: Jason Pyeron \n> Sent: Friday, June 27, 2014 18:39\n> \n> > -----Original Message-----\n> > From: Phil Hord [mailto:phil.hord@gmail.com] \n> > Sent: Friday, June 27, 2014 17:46\n> > To: Jason Pyeron\n> > Cc: git\n> > Subject: Re: Trouble merging renamed but identical files - \n> > CONFLICT (rename/rename)\n> > \n> > On Fri, Jun 27, 2014 at 4:47 PM, Jason Pyeron \n> > <jpyeron@pdinc.us> wrote:\n> > > There are two identical files from the same original \n> > parent, but both were\n> > > renamed in their own branches. One branch moved the file to \n> > a new folder, the\n> > > other renamed the file in the same folder.\n> > \n> > You have not stated what you think the issue is.  You have \n> only stated\n> > the setup.\n> \n> Thanks, I could have said it better. \n> \n> I think that git should understand that I have moved a file \n> in path only (the tree object containing the file's entry \n> change, but not the entry it self) and that the branch from \n> which I want to merge back (with common ancestry) has renamed \n> the file in the same path ( the tree object is unchanged, but \n> the entry is) such that the object is re-parented and renamed \n> in that path.\n> \n> How can this be done in git or if it cannot what are the \n> chalenges to patching git for this issue.\n> \n> git cat-file -p b60070f4d0879e277f44d174a163bbb292325fea # \n> tree d8df83fc6714aab1fc1df061fcb03410e1dab1e5\n> git cat-file -p d8df83fc6714aab1fc1df061fcb03410e1dab1e5 # \n> 040000 tree 68bb8a223284e0f5057421217a5965128bf1d51a    src\n> git cat-file -p 68bb8a223284e0f5057421217a5965128bf1d51a # \n> 100644 blob 25c7d3b12bced67046359ba1e7945f82a2640147    TrueCrypt.sln\n> \n> git cat-file -p a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68 # \n> tree 7f82a6c46f19931c3c40d44dc196cbfab7feaa72\n> git cat-file -p 7f82a6c46f19931c3c40d44dc196cbfab7feaa72 # \n> 100644 blob 25c7d3b12bced67046359ba1e7945f82a2640147    CipherShed.sln\n> \n> > \n> > \n> > I suppose you want Git to merge without conflict in the end, though,\n> > based on your script.  Is that right?\n> > \n> > \n> > > Steps to reproduce the issue:\n> > > git init\n> > > git fetch https://github.com/pdinc-oss/CipherShed.git\n> > > git fetch https://github.com/srguglielmo/CipherShed.git\n> > > git checkout -b test b60070f4d0879e277f44d174a163bbb292325fea\n> > > git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> > >\n> > > CONFLICT (rename/rename): Rename \n> > \"TrueCrypt.sln\"->\"src/TrueCrypt.sln\" in branch\n> > > \"HEAD\" rename \"TrueCrypt.sln\"->\"CipherShed.sln\" in\n> > > \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n> > \n> > Git seems to be doing the correct thing here.\n> > \n> > \n> > > git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n> > > git mv src/TrueCrypt.sln src/CipherShed.sln\n> > > git commit -m 'renamed to be congruent with a0c84ff'\n> > > git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> > >\n> > > Sill get a CONFLICT (rename/rename): Rename\n> > > \"TrueCrypt.sln\"->\"src/CipherShed.sln\" in branch \"HEAD\" rename\n> > > \"TrueCrypt.sln\"->\"CipherShed.sln\" in \n> > \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n> > \n> > Git seems to be doing the correct thing here, too.\n> > \n> > > I will have many more to come, any suggestions?\n> > \n> > Maybe you meant to move the renamed file to the same folder where it\n> > exists in the merge target.  I do not get a conflict when I do that.\n> \n> Are you saying I should git mv src/TrueCrypt.sln CipherShed.sln ?\n> \n> Then it will be in the wrong path as intended.\n> \n> > \n> >    git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n> >    git mv src/TrueCrypt.sln CipherShed.sln\n> >    git commit -m 'renamed to be congruent with a0c84ff'\n> >    git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> > \n> > No conflict (on that file, anyway).\n> \n> Agreed, but not the desired end state.\n\nSorry for the http://pastebin.com/1R68v6jt (changes the merge to\n1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually reconciles the merge),\nbut it was too long to be readable in the email.\n\ngit blame HEAD -- src/Main/Forms/CipherShed.fbp | cut -c 1-8 | sort -u \n\nGives: \nac812aa3\nb50a2fb1\n\ngit blame b60070f4d0879e277f44d174a163bbb292325fea --\nsrc/Main/Forms/TrueCrypt.fbp | cut -c 1-8 | sort -u\n\nGives: \n07b2176f\n0eb8b4fa\n12c94add\na17c95a3\na757b4d4\ncac6cd14\nd0a9dfa8\nd94128a9\ne6b1437a\nf1bb489c\n\nIf I use cherry pick (vs merge), I can maintain the big history in b60070f, but\nloose the small history in 1ca13ed\n\n      [test]\n      /     \\\n     /       \\\n[b60070f] [1ca13ed]\n    |         |\n    |         |\n[65efd37]     |\n    |    \\    |\n    |     \\   |\n[d8da778] [39ebb06]\n\nHow do I maintain all the history including the (line) changes in 1ca13ed?\n\n-Jason\n\n--\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-                                                               -\n- Jason Pyeron                      PD Inc. http://www.pdinc.us -\n- Principal Consultant              10 West 24th Street #100    -\n- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -\n-                                                               -\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nThis message is copyright PD Inc, subject to license 20080407P00.\n\n \n"},{"id":"245118","messageId":"E569F92DE6554654A2133A162EDB688E@black","threadId":"37012","inReplyTo":"CEAC9BE9F83B4CD0AFD73BBAC8A54232@black","subject":"RE: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2014-06-28T09:46:04Z","receivedAt":"2014-06-28T09:46:04Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"> -----Original Message-----\n> From: Jason Pyeron\n> Sent: Friday, June 27, 2014 20:42\n> To: 'git'\n> Cc: 'Phil Hord'\n> Subject: RE: Trouble merging renamed but identical files - \n> CONFLICT (rename/rename)\n> \n> > -----Original Message-----\n> > From: Jason Pyeron \n> > Sent: Friday, June 27, 2014 18:39\n> > \n> > > -----Original Message-----\n> > > From: Phil Hord [mailto:phil.hord@gmail.com] \n> > > Sent: Friday, June 27, 2014 17:46\n> > > To: Jason Pyeron\n> > > Cc: git\n> > > Subject: Re: Trouble merging renamed but identical files - \n> > > CONFLICT (rename/rename)\n> > > \n> > > On Fri, Jun 27, 2014 at 4:47 PM, Jason Pyeron \n> > > <jpyeron@pdinc.us> wrote:\n> > > > There are two identical files from the same original \n> > > parent, but both were\n> > > > renamed in their own branches. One branch moved the file to \n> > > a new folder, the\n> > > > other renamed the file in the same folder.\n> > > \n> > > You have not stated what you think the issue is.  You have \n> > only stated\n> > > the setup.\n> > \n> > Thanks, I could have said it better. \n> > \n> > I think that git should understand that I have moved a file \n> > in path only (the tree object containing the file's entry \n> > change, but not the entry it self) and that the branch from \n> > which I want to merge back (with common ancestry) has renamed \n> > the file in the same path ( the tree object is unchanged, but \n> > the entry is) such that the object is re-parented and renamed \n> > in that path.\n> > \n> > How can this be done in git or if it cannot what are the \n> > chalenges to patching git for this issue.\n> > \n> > git cat-file -p b60070f4d0879e277f44d174a163bbb292325fea # \n> > tree d8df83fc6714aab1fc1df061fcb03410e1dab1e5\n> > git cat-file -p d8df83fc6714aab1fc1df061fcb03410e1dab1e5 # \n> > 040000 tree 68bb8a223284e0f5057421217a5965128bf1d51a    src\n> > git cat-file -p 68bb8a223284e0f5057421217a5965128bf1d51a # \n> > 100644 blob 25c7d3b12bced67046359ba1e7945f82a2640147    \n> TrueCrypt.sln\n> > \n> > git cat-file -p a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68 # \n> > tree 7f82a6c46f19931c3c40d44dc196cbfab7feaa72\n> > git cat-file -p 7f82a6c46f19931c3c40d44dc196cbfab7feaa72 # \n> > 100644 blob 25c7d3b12bced67046359ba1e7945f82a2640147    \n> CipherShed.sln\n> > \n> > > \n> > > \n> > > I suppose you want Git to merge without conflict in the \n> end, though,\n> > > based on your script.  Is that right?\n> > > \n> > > \n> > > > Steps to reproduce the issue:\n> > > > git init\n> > > > git fetch https://github.com/pdinc-oss/CipherShed.git\n> > > > git fetch https://github.com/srguglielmo/CipherShed.git\n> > > > git checkout -b test b60070f4d0879e277f44d174a163bbb292325fea\n> > > > git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> > > >\n> > > > CONFLICT (rename/rename): Rename \n> > > \"TrueCrypt.sln\"->\"src/TrueCrypt.sln\" in branch\n> > > > \"HEAD\" rename \"TrueCrypt.sln\"->\"CipherShed.sln\" in\n> > > > \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n> > > \n> > > Git seems to be doing the correct thing here.\n> > > \n> > > \n> > > > git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n> > > > git mv src/TrueCrypt.sln src/CipherShed.sln\n> > > > git commit -m 'renamed to be congruent with a0c84ff'\n> > > > git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> > > >\n> > > > Sill get a CONFLICT (rename/rename): Rename\n> > > > \"TrueCrypt.sln\"->\"src/CipherShed.sln\" in branch \"HEAD\" rename\n> > > > \"TrueCrypt.sln\"->\"CipherShed.sln\" in \n> > > \"a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\"\n> > > \n> > > Git seems to be doing the correct thing here, too.\n> > > \n> > > > I will have many more to come, any suggestions?\n> > > \n> > > Maybe you meant to move the renamed file to the same \n> folder where it\n> > > exists in the merge target.  I do not get a conflict when \n> I do that.\n> > \n> > Are you saying I should git mv src/TrueCrypt.sln CipherShed.sln ?\n> > \n> > Then it will be in the wrong path as intended.\n> > \n> > > \n> > >    git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n> > >    git mv src/TrueCrypt.sln CipherShed.sln\n> > >    git commit -m 'renamed to be congruent with a0c84ff'\n> > >    git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n> > > \n> > > No conflict (on that file, anyway).\n> > \n> > Agreed, but not the desired end state.\n> \n> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to\n> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually \n> reconciles the merge),\n> but it was too long to be readable in the email.\n> \n> git blame HEAD -- src/Main/Forms/CipherShed.fbp | cut -c 1-8 \n> | sort -u \n> \n> Gives: \n> ac812aa3\n> b50a2fb1\n> \n> git blame b60070f4d0879e277f44d174a163bbb292325fea --\n> src/Main/Forms/TrueCrypt.fbp | cut -c 1-8 | sort -u\n> \n> Gives: \n> 07b2176f\n> 0eb8b4fa\n> 12c94add\n> a17c95a3\n> a757b4d4\n> cac6cd14\n> d0a9dfa8\n> d94128a9\n> e6b1437a\n> f1bb489c\n> \n> If I use cherry pick (vs merge), I can maintain the big \n> history in b60070f, but\n> loose the small history in 1ca13ed\n> \n>       [test]\n>       /     \\\n>      /       \\\n> [b60070f] [1ca13ed]\n>     |         |\n>     |         |\n> [65efd37]     |\n>     |    \\    |\n>     |     \\   |\n> [d8da778] [39ebb06]\n> \n> How do I maintain all the history including the (line) \n> changes in 1ca13ed?\n\n# http://pastebin.com/TuqhYubH \n\n# do the cerry picks, then...\n\ngit merge $(echo 'Merge of 1ca13ed2271d60ba93d40bcc8db17ced8545f172 branch -\nrebranding' |\\\n   git commit-tree -p HEAD -p rebranding \\\n     $(git cat-file -p HEAD | grep ^tree | sed -e 's/^tree //') )\n\nPerfect results. This does not seem like this should be the \"right\" way to do\nit.\n\n\nInstead of git merge rebranding, which gives CONFLICT (rename/rename)....\nAutomatic merge failed; fix conflicts and then commit the result. Followed by\nbad blame lines.\n\n-Jason\n\n--\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-                                                               -\n- Jason Pyeron                      PD Inc. http://www.pdinc.us -\n- Principal Consultant              10 West 24th Street #100    -\n- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -\n-                                                               -\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nThis message is copyright PD Inc, subject to license 20080407P00.\n\n \n"},{"id":"245159","messageId":"CABURp0oy6LcZD1k7wx=JEg=iU0Z=SeWdNv3ZQHxSYpZWr=7+Dg@mail.gmail.com","threadId":"37012","inReplyTo":"073A89A2555A4CD6AB28AF42078575ED@black","subject":"Re: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2014-06-29T15:28:09Z","receivedAt":"2014-06-29T15:28:09Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Fri, Jun 27, 2014 at 6:39 PM, Jason Pyeron <jpyeron@pdinc.us> wrote:\n>> On Fri, Jun 27, 2014 at 4:47 PM, Jason Pyeron\n>> <jpyeron@pdinc.us> wrote:\n>> > There are two identical files from the same original\n>> parent, but both were\n>> > renamed in their own branches. One branch moved the file to\n>> a new folder, the\n>> > other renamed the file in the same folder.\n>>\n>> You have not stated what you think the issue is.  You have only stated\n>> the setup.\n>\n> Thanks, I could have said it better.\n>\n> I think that git should understand that I have moved a file in path only (the\n> tree object containing the file's entry change, but not the entry it self) and\n> that the branch from which I want to merge back (with common ancestry) has\n> renamed the file in the same path ( the tree object is unchanged, but the entry\n> is) such that the object is re-parented and renamed in that path.\n\nI think Git's perspective is that you have moved the file in both\ncontexts. The name of the file includes the path and filename.  The\nfact is that you renamed the file in both branches.  If you had\nrenamed the file in only one branch, Git would have had a better\nchance of figuring out the \"right\" thing to do.  Git tries not to do\nsomething potentially dangerous without getting your involvement.\n\nThat said, Git's rename handling is stupid sometimes and could stand\nto be improved.\n\n> How can this be done in git or if it cannot what are the chalenges to patching\n> git for this issue.\n\nI do not know a better thing for git to do here.  I can imagine cases\nwhere either choice is the wrong one.  If git silently makes the\nchoice and continues, say, during a rebase, you might not notice until\nthings have horribly awry.\n\n\n>> ...\n>> Maybe you meant to move the renamed file to the same folder where it\n>> exists in the merge target.  I do not get a conflict when I do that.\n>\n> Are you saying I should git mv src/TrueCrypt.sln CipherShed.sln ?\n>\n> Then it will be in the wrong path as intended.\n>\n>>\n>>    git reset --hard b60070f4d0879e277f44d174a163bbb292325fea\n>>    git mv src/TrueCrypt.sln CipherShed.sln\n>>    git commit -m 'renamed to be congruent with a0c84ff'\n>>    git merge a0c84ff28f356bcb8b872a9c65a2e9bff97b3f68\n>>\n>> No conflict (on that file, anyway).\n>\n> Agreed, but not the desired end state.\n\nGit's magic still has limits.\n\nPhil\n"},{"id":"245160","messageId":"CABURp0okCDbwLOL3Osj2WtfQ_Qj3v=1FrAV28gJjPy1yzQU7Vg@mail.gmail.com","threadId":"37012","inReplyTo":"CEAC9BE9F83B4CD0AFD73BBAC8A54232@black","subject":"Re: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2014-06-29T15:31:06Z","receivedAt":"2014-06-29T15:31:06Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Fri, Jun 27, 2014 at 8:42 PM, Jason Pyeron <jpyeron@pdinc.us> wrote:\n> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to\n> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually reconciles the merge),\n> but it was too long to be readable in the email.\n>\n> git blame HEAD -- src/Main/Forms/CipherShed.fbp | cut -c 1-8 | sort -u\n>\n> Gives:\n> ac812aa3\n> b50a2fb1\n>\n> git blame b60070f4d0879e277f44d174a163bbb292325fea --\n> src/Main/Forms/TrueCrypt.fbp | cut -c 1-8 | sort -u\n>\n> Gives:\n> 07b2176f\n> 0eb8b4fa\n> 12c94add\n> a17c95a3\n> a757b4d4\n> cac6cd14\n> d0a9dfa8\n> d94128a9\n> e6b1437a\n> f1bb489c\n>\n> If I use cherry pick (vs merge), I can maintain the big history in b60070f, but\n> loose the small history in 1ca13ed\n>\n>       [test]\n>       /     \\\n>      /       \\\n> [b60070f] [1ca13ed]\n>     |         |\n>     |         |\n> [65efd37]     |\n>     |    \\    |\n>     |     \\   |\n> [d8da778] [39ebb06]\n>\n> How do I maintain all the history including the (line) changes in 1ca13ed?\n\nI see the results, but my brain is not able to make sense of your goal\nyet.  I'll try again later when I've had my coffee.\n"},{"id":"245161","messageId":"CABURp0qZVMGMQ8X4P0P1OGF9gNqu__=Uk+Lr7GyBbscm5wL1=w@mail.gmail.com","threadId":"37012","inReplyTo":"CABURp0okCDbwLOL3Osj2WtfQ_Qj3v=1FrAV28gJjPy1yzQU7Vg@mail.gmail.com","subject":"Re: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2014-06-29T20:09:19Z","receivedAt":"2014-06-29T20:09:19Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Sun, Jun 29, 2014 at 11:31 AM, Phil Hord <phil.hord@gmail.com> wrote:\n> On Fri, Jun 27, 2014 at 8:42 PM, Jason Pyeron <jpyeron@pdinc.us> wrote:\n>> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to\n>> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually reconciles the merge),\n>> but it was too long to be readable in the email.\n\nOk, I think I understand the issue you are trying to solve now.\n\nGit (rather famously[1]) does not record renames or copies.  It is\nexpected instead that renames and copies will be detected when it is\nimportant after the fact. This allows us to ignore rename detection\nand resolution when creating project history; in the future, better\nrename/copy detection will \"just work\" on existing repositories and\nthe repos themselves will not need to be adjusted.\n\nWhat you are encountering now seems to be a shortcoming of Git's\ncurrent rename/copy detection.  But you are trying to overcome today's\nshortcoming by adjusting your project history to accommodate it.\nInstead you should just do the merge like you normally would without\nregard to how 'git blame' shows the result.\n\nMaybe there is a bug here still, but it is probably in git-blame.\n\n[1] https://git.wiki.kernel.org/index.php/GitFaq#Why_does_Git_not_.22track.22_renames.3F\n"},{"id":"245162","messageId":"35E240FD8DD74A2F9B80FFCBD818A122@black","threadId":"37012","inReplyTo":"CABURp0qZVMGMQ8X4P0P1OGF9gNqu__=Uk+Lr7GyBbscm5wL1=w@mail.gmail.com","subject":"RE: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2014-06-29T20:20:22Z","receivedAt":"2014-06-29T20:20:22Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"> -----Original Message-----\n> From: Phil Hord \n> Sent: Sunday, June 29, 2014 16:09\n> \n> On Sun, Jun 29, 2014 at 11:31 AM, Phil Hord \n> <phil.hord@gmail.com> wrote:\n> > On Fri, Jun 27, 2014 at 8:42 PM, Jason Pyeron \n> <jpyeron@pdinc.us> wrote:\n> >> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to\n> >> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually \n> reconciles the merge),\n> >> but it was too long to be readable in the email.\n> \n> Ok, I think I understand the issue you are trying to solve now.\n> \n> Git (rather famously[1]) does not record renames or copies.  It is\n> expected instead that renames and copies will be detected when it is\n> important after the fact. This allows us to ignore rename detection\n> and resolution when creating project history; in the future, better\n> rename/copy detection will \"just work\" on existing repositories and\n> the repos themselves will not need to be adjusted.\n\nLooking at http://pastebin.com/1R68v6jt , I have a work around.\n\nIn summary, 7.git cherry-pick -x HEAD..rebranding , then\n\ngit merge $(echo 'Merge of 1ca13ed2271d60ba93d40bcc8db17ced8545f172 branch -\nrebranding' |\\\n    git commit-tree -p HEAD -p rebranding \\\n         $(git cat-file -p HEAD | grep ^tree | sed -e 's/^tree //') )\n\nNow it is perfect in the blame and log --graph.\n\n> \n> What you are encountering now seems to be a shortcoming of Git's\n> current rename/copy detection.  But you are trying to overcome today's\n> shortcoming by adjusting your project history to accommodate it.\n> Instead you should just do the merge like you normally would without\n> regard to how 'git blame' shows the result.\n> \n> Maybe there is a bug here still, but it is probably in git-blame.\n> \n> [1] \n> https://git.wiki.kernel.org/index.php/GitFaq#Why_does_Git_not_\n> .22track.22_renames.3F\n> \n--\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-                                                               -\n- Jason Pyeron                      PD Inc. http://www.pdinc.us -\n- Principal Consultant              10 West 24th Street #100    -\n- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -\n-                                                               -\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nThis message is copyright PD Inc, subject to license 20080407P00.\n"},{"id":"245163","messageId":"CABURp0q1u_Hzz2ni63oHuinFpBTCzZ+=-6h5YpC0k_bQ_03TSA@mail.gmail.com","threadId":"37012","inReplyTo":"35E240FD8DD74A2F9B80FFCBD818A122@black","subject":"Re: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2014-06-29T20:26:47Z","receivedAt":"2014-06-29T20:26:47Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Sun, Jun 29, 2014 at 4:20 PM, Jason Pyeron <jpyeron@pdinc.us> wrote:\n>> -----Original Message-----\n>> From: Phil Hord\n>> Sent: Sunday, June 29, 2014 16:09\n>>\n>> On Sun, Jun 29, 2014 at 11:31 AM, Phil Hord\n>> <phil.hord@gmail.com> wrote:\n>> > On Fri, Jun 27, 2014 at 8:42 PM, Jason Pyeron\n>> <jpyeron@pdinc.us> wrote:\n>> >> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to\n>> >> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually\n>> reconciles the merge),\n>> >> but it was too long to be readable in the email.\n>>\n>> Ok, I think I understand the issue you are trying to solve now.\n>>\n>> Git (rather famously[1]) does not record renames or copies.  It is\n>> expected instead that renames and copies will be detected when it is\n>> important after the fact. This allows us to ignore rename detection\n>> and resolution when creating project history; in the future, better\n>> rename/copy detection will \"just work\" on existing repositories and\n>> the repos themselves will not need to be adjusted.\n>\n> Looking at http://pastebin.com/1R68v6jt , I have a work around.\n>\n> In summary, 7.git cherry-pick -x HEAD..rebranding , then\n>\n> git merge $(echo 'Merge of 1ca13ed2271d60ba93d40bcc8db17ced8545f172 branch -\n> rebranding' |\\\n>     git commit-tree -p HEAD -p rebranding \\\n>          $(git cat-file -p HEAD | grep ^tree | sed -e 's/^tree //') )\n>\n> Now it is perfect in the blame and log --graph.\n\nYes, but your workaround unnecessarily duplicates commits and\ncomplicates the history of your project. You are munging your project\nto compensate for git's current shortcomings.\n\nBut it's your project.  Your choice.\n"},{"id":"245166","messageId":"CBA6D67B4439423CB4F73F3DD3C08952@black","threadId":"37012","inReplyTo":"CABURp0q1u_Hzz2ni63oHuinFpBTCzZ+=-6h5YpC0k_bQ_03TSA@mail.gmail.com","subject":"RE: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2014-06-29T21:13:07Z","receivedAt":"2014-06-29T21:13:07Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"> -----Original Message-----\n> From: Phil Hord\n> Sent: Sunday, June 29, 2014 16:27\n> \n> On Sun, Jun 29, 2014 at 4:20 PM, Jason Pyeron \n> <jpyeron@pdinc.us> wrote:\n> >> -----Original Message-----\n> >> From: Phil Hord\n> >> Sent: Sunday, June 29, 2014 16:09\n> >>\n> >> On Sun, Jun 29, 2014 at 11:31 AM, Phil Hord\n> >> <phil.hord@gmail.com> wrote:\n> >> > On Fri, Jun 27, 2014 at 8:42 PM, Jason Pyeron\n> >> <jpyeron@pdinc.us> wrote:\n> >> >> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to\n> >> >> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually\n> >> reconciles the merge),\n> >> >> but it was too long to be readable in the email.\n> >>\n> >> Ok, I think I understand the issue you are trying to solve now.\n> >>\n> >> Git (rather famously[1]) does not record renames or copies.  It is\n> >> expected instead that renames and copies will be detected \n> when it is\n> >> important after the fact. This allows us to ignore rename detection\n> >> and resolution when creating project history; in the future, better\n> >> rename/copy detection will \"just work\" on existing repositories and\n> >> the repos themselves will not need to be adjusted.\n> >\n> > Looking at http://pastebin.com/1R68v6jt , I have a work around.\n> >\n> > In summary, 7.git cherry-pick -x HEAD..rebranding , then\n> >\n> > git merge $(echo 'Merge of \n> 1ca13ed2271d60ba93d40bcc8db17ced8545f172 branch -\n> > rebranding' |\\\n> >     git commit-tree -p HEAD -p rebranding \\\n> >          $(git cat-file -p HEAD | grep ^tree | sed -e \n> 's/^tree //') )\n> >\n> > Now it is perfect in the blame and log --graph.\n> \n> Yes, but your workaround unnecessarily duplicates commits and\n> complicates the history of your project. You are munging your project\n\nBut I want to avoid thet complicating, while still showing that line 42 was\nmodified by X. Should this be possible with a merge, without using cherry-pick?\n\n> to compensate for git's current shortcomings.\n\nBtw I am not able to pull up https://git.wiki.kernel.org/ or\nhttp://git.wiki.kernel.org/ \n\n-Jason \n\n--\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-                                                               -\n- Jason Pyeron                      PD Inc. http://www.pdinc.us -\n- Principal Consultant              10 West 24th Street #100    -\n- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -\n-                                                               -\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nThis message is copyright PD Inc, subject to license 20080407P00.\n"},{"id":"245167","messageId":"CABURp0pwWRjocTbbRLG4tkd_W8ZPswMzwoUhe4geUF6bGdVoKQ@mail.gmail.com","threadId":"37012","inReplyTo":"CBA6D67B4439423CB4F73F3DD3C08952@black","subject":"Re: Trouble merging renamed but identical files - CONFLICT (rename/rename)","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2014-06-30T01:42:24Z","receivedAt":"2014-06-30T01:42:24Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Sun, Jun 29, 2014 at 5:13 PM, Jason Pyeron <jpyeron@pdinc.us> wrote:\n>> -----Original Message-----\n>> From: Phil Hord\n>> Sent: Sunday, June 29, 2014 16:27\n>>\n>> On Sun, Jun 29, 2014 at 4:20 PM, Jason Pyeron\n>> <jpyeron@pdinc.us> wrote:\n>> >> -----Original Message-----\n>> >> From: Phil Hord\n>> >> Sent: Sunday, June 29, 2014 16:09\n>> >>\n>> >> On Sun, Jun 29, 2014 at 11:31 AM, Phil Hord\n>> >> <phil.hord@gmail.com> wrote:\n>> >> > On Fri, Jun 27, 2014 at 8:42 PM, Jason Pyeron\n>> >> <jpyeron@pdinc.us> wrote:\n>> >> >> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to\n>> >> >> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually\n>> >> reconciles the merge),\n>> >> >> but it was too long to be readable in the email.\n>> >>\n>> >> Ok, I think I understand the issue you are trying to solve now.\n>> >>\n>> >> Git (rather famously[1]) does not record renames or copies.  It is\n>> >> expected instead that renames and copies will be detected\n>> when it is\n>> >> important after the fact. This allows us to ignore rename detection\n>> >> and resolution when creating project history; in the future, better\n>> >> rename/copy detection will \"just work\" on existing repositories and\n>> >> the repos themselves will not need to be adjusted.\n>> >\n>> > Looking at http://pastebin.com/1R68v6jt , I have a work around.\n>> >\n>> > In summary, 7.git cherry-pick -x HEAD..rebranding , then\n>> >\n>> > git merge $(echo 'Merge of\n>> 1ca13ed2271d60ba93d40bcc8db17ced8545f172 branch -\n>> > rebranding' |\\\n>> >     git commit-tree -p HEAD -p rebranding \\\n>> >          $(git cat-file -p HEAD | grep ^tree | sed -e\n>> 's/^tree //') )\n>> >\n>> > Now it is perfect in the blame and log --graph.\n>>\n>> Yes, but your workaround unnecessarily duplicates commits and\n>> complicates the history of your project. You are munging your project\n>\n> But I want to avoid thet complicating, while still showing that line 42 was\n> modified by X. Should this be possible with a merge, without using cherry-pick?\n\nI think it should.  But there are other complications in your project\nwhich may be getting in the way. You are merging two branches with no\ncommon ancestor.  When git walks down either path looking for the\nsource commit for each line, it finds two sources for it.  For\nexample, it reaches commit 39ebb06 which appears to be the origin of\nall lines in that file since it has no parent. I imagine this could\nact as a short-circuit to further searching.  Furthermore, I'm not\nsure how git should know any better.\n\nIt seems you already have a merge point for these two branches, but I\nhaven't looked deeply into how that merge was done.  But I think the\nmultiple disconnected branch histories may be the cause of the\nconfusion.\n\n> Btw I am not able to pull up https://git.wiki.kernel.org/ or\n> http://git.wiki.kernel.org/\n\n\nThat is strange.  It works for me here, and I am just a user like you.\n\nPhil\n"}]}