threads / discuss / 44709

Cherry-pick applied X times

Subject: Cherry-pick applied X times

## tl;dr

One message between Dec 15, 2016 and Dec 15, 2016.

replies: 0people: 1as markdown or json

Delanoe, Yann· Dec 15, 2016, 08:12 UTC · lore
Hi Git community, 
 
I'm new to GIT and responsible of a project to migrate our SVN repo to GIT.
I'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.
 
It happen with our delivery workflow that we will have to use cherry-picks to prepare our patches, so I made some test on it.
 
During 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.
 
I looked in SVN, the merge property of the first commit from master to the release branch is ok.
Our SVN repo has more than 22K revisions
 
I found out that some other commits had the same behaviour.
 
Is there a direction onto which I should investigate to determine where the problem comes from ?
 
Here is an example of the multiple cherry pick.
Branches:
 
> git branch
  master
* release/15.0.0
  release/15.3.0
 
Check commit already exist on release (cb8c480) and get master hash (bee110c):
 
> git log --oneline |grep GTX-20264
cb8c480 GTX-20264 : Missing end of string in field hostReference for custom network ack
> git checkout master

Switched to branch 'master' Your branch is up-to-date with 'origin/master'.

> git log --oneline |grep GTX-20264
bee110c GTX-20264 : Missing end of string in field hostReference for custom network ack
> git checkout release/15.0.0
Switched to branch 'release/15.0.0'
Your branch is up-to-date with 'origin/release/15.0.0'.
 
 
And now I cherry-pick the master commit onto the release/15.0.0 a multiple of times:
> git cherry-pick bee110c
[release/15.0.0 e8bfc33] GTX-20264 : Missing end of string in field hostReference for custom network ack
Author: Yann Delanoe <ydelanoe@bottomline.com>
1 file changed, 3 insertions(+)
> git cherry-pick bee110c
[release/15.0.0 2b98c8d] GTX-20264 : Missing end of string in field hostReference for custom network ack
Author: Yann Delanoe <ydelanoe@bottomline.com>
1 file changed, 3 insertions(+)
> git cherry-pick bee110c
[release/15.0.0 820cd8a] GTX-20264 : Missing end of string in field hostReference for custom network ack
Author: Yann Delanoe <ydelanoe@bottomline.com>
1 file changed, 3 insertions(+)
 
 
Best regards
Yann DELANOE - Product engineer - Bottomline technologies

← back to recent threads