On Wed, Oct 22, 2014 at 5:23 PM, Kent Brinkley <[email protected]>
wrote:

>  Hi Guys,
>
>
>
> I guess I am a fuzzy on the steps used to re-submit a patch, can you
> provide detail steps on how this is done. I have reviewed the patch guide
> but I did not find any information on re-submitting a patch.
>
>
I don't think it's re-submission specifically you have a problem with. That
is as easy as re-running "git push review". I guess what you find hard is
how to prepare that which you're going to push.

With Gerrit, you're not pushing *a* patch, you're pushing the entire
history of your local repository, up to and including that commit. Every
commit since origin/master (or whichever most recent commit you have in
common with upstream) will result in a separate "change" in Gerrit.

So your local "git log" should appear exactly like the set of patches that
you want to contribute. That means all of them have to build, pass
checkpatch and so on (preferably check this locally before pushing). No
followup "fixes" to previous commits in the set, those fixes should be
squashed into the commits they fix.

Changes that already exist in Gerrit but are remade or fixed should include
the same Change-Id line in the commit message as the original change. The
Change-Id line is the only way Gerrit uses to determine if a change is a
new one or a new version of another change.

The history of commits should also base off of a recent enough upstream
master so as not to cause conflicts when the changes are submitted after
review.

The patch guide has only one hint how to do this:

"
Forgot something, want to add more? Just make the changes and do:
git commit --amend
git push review
"

Which may be confusing since it only works when the very last commit is the
only one that has to be fixed. In the generic case you'll need "git rebase
-i origin/master", after reading up on history rewriting with git.

Hope this helps a bit otherwise please describe what it is you have trouble
with and how you got there and we'll see where things went wrong.

/Andreas
------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to