Dear Bernd, Thanks for writing the script. I tried using this between two GIT branches, to find out commits, that are not yet cherry-picked or pushed (directly in another branch).
I found, it is picking up commits, that are already there in branch b.
Please let me know what all info I can provide and how?
Hi Anonymous,
I don't think it is a bug, it is probably just a missing README. So the problem is the way the script works. It uses 'git patch-id' for a given git diff and uses this ID to compare commits. So basically it compares the diffs based on a string hash. Now this works fine, unless you had to rebase your commits during a cherry-pick and so the rebase would have changed at least one character in that diff (what is usually does if there had been any kind of conflicts, even if git could resolve those itself).
Now to workaround that issue, the scipt also checks for "(cherry picked from commit …)" and checks if so-far-missing commits had been cherry-picked from the other branch and can be ignored. All you need to do to make this work is to cherry pick using ''git cherry-pick -x'.
In my current project we use gerrit with gerrit IDs and once I find some time (and also requirement from the project), I'm also going to add a filter for those IDs.
Please let me know if you have any suggestions how to improve the filter logic!