{"thread":{"id":"44709","subject":"Cherry-pick applied X times","startedAt":"2016-12-15T08:24:32Z","lastAt":"2016-12-15T08:24:32Z","messageCount":1,"participants":["Delanoe, Yann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"307833","messageId":"86615A36E8C3764D961288367F120A475E5C0DE9@CH02VWMX0001.us-bottomline.root.bottomline.com","threadId":"44709","inReplyTo":null,"subject":"Cherry-pick applied X times","fromName":"Delanoe, Yann","fromEmail":"ydelanoe@bottomline.com","sentAt":"2016-12-15T08:12:47Z","receivedAt":"2016-12-15T08:24:32Z","isPatch":false,"sender":{"key":"ydelanoe@bottomline.com","avatar":null},"body":"Hi Git community, \n \nI'm new to GIT and responsible of a project to migrate our SVN repo to GIT.\nI've made the migration with the git-svn tools ... it was long, but everything seems fine ; source code is correct and all its history is there.\n \nIt happen with our delivery workflow that we will have to use cherry-picks to prepare our patches, so I made some test on it.\n \nDuring those tests I saw a strange behaviour: I tried to cherry-pick onto a release branch a commit from the master that had been previously already merged onto this branch with SVN. GIT did not detect it and added the code a second time in the source file modified. I supposed this was du the fact the first merge had been made with SVN. I tried to cherry pick the same commit again ... and GIT add one more time the code of the commit. It appears I could cherry-pick this commit X times with GIT, and each time he added the code again.\n \nI looked in SVN, the merge property of the first commit from master to the release branch is ok.\nOur SVN repo has more than 22K revisions\n \nI found out that some other commits had the same behaviour.\n \nIs there a direction onto which I should investigate to determine where the problem comes from ?\n \n\nHere is an example of the multiple cherry pick.\n\nBranches:\n \n> git branch\n  master\n* release/15.0.0\n  release/15.3.0\n \nCheck commit already exist on release (cb8c480) and get master hash (bee110c):\n \n> git log --oneline |grep GTX-20264\ncb8c480 GTX-20264 : Missing end of string in field hostReference for custom network ack\n> git checkout master\nSwitched to branch 'master'\nYour branch is up-to-date with 'origin/master'.\n> git log --oneline |grep GTX-20264\nbee110c GTX-20264 : Missing end of string in field hostReference for custom network ack\n> git checkout release/15.0.0\nSwitched to branch 'release/15.0.0'\nYour branch is up-to-date with 'origin/release/15.0.0'.\n \n \nAnd now I cherry-pick the master commit onto the release/15.0.0 a multiple of times:\n\n> git cherry-pick bee110c\n[release/15.0.0 e8bfc33] GTX-20264 : Missing end of string in field hostReference for custom network ack\nAuthor: Yann Delanoe <ydelanoe@bottomline.com>\n1 file changed, 3 insertions(+)\n> git cherry-pick bee110c\n[release/15.0.0 2b98c8d] GTX-20264 : Missing end of string in field hostReference for custom network ack\nAuthor: Yann Delanoe <ydelanoe@bottomline.com>\n1 file changed, 3 insertions(+)\n> git cherry-pick bee110c\n[release/15.0.0 820cd8a] GTX-20264 : Missing end of string in field hostReference for custom network ack\nAuthor: Yann Delanoe <ydelanoe@bottomline.com>\n1 file changed, 3 insertions(+)\n \n\n \nBest regards\nYann DELANOE - Product engineer - Bottomline technologies\n"}]}