Git: find new cherries

I created a process based on Adam Spears' answer in a previous SO thread to periodically publish the Git repository for the path to the SVN Repository. Everything works very well, but there is one piece that I did not understand. When I capture subsequent Git changes using cherry-pick , how can I determine what new changes have occurred on this side of Git, do I need to get cherry to the SVN side?

To be more specific, after the first input of the Git history to SVN, I now sit on the master branch, which has the same content and patch history as the Git source, but it deviated from origin/master mainly throughout its history:

 % git --no-pager diff master git-svn % git status # On branch master # Your branch and 'origin/master' have diverged, # and have 3 and 2 different commit(s) each, respectively. # nothing to commit (working directory clean) 

Now I am making a selection of new upstream changes:

 % git fetch remote: Counting objects: 5, done. remote: Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From /cygdrive/c/foo/git/testrep 6d7dd94..08d3d19 master -> origin/master 

At this point I need to figure out which revisions to choose from the cherry, then I will take the cherry and make git svn dcommit . But I can’t figure out how to get this list of cherries. I tried various git cherry commands, and both git cherry origin master and git cherry master origin reported long lists, basically, every change on each side.

Should I resort to parsing the last cherry highlight from the log file? I am using git cherry-pick -x , so I have a record.

0
source share
1 answer

So, I think I have a solution - after each round of git cherry-pick ... git svn dcommit I do a git tag -f last-picked origin . Then, next time, I can blacken from last-picked to origin .

I want to note that someone answered as accepted if they have a better solution, but at the moment it seems like I don't need another answer.

0
source

Source: https://habr.com/ru/post/1440155/


All Articles