On Wed, Oct 24, 2012 at 2:54 PM, gianluca
<gianlucare...@eurekelettronica.it> wrote:
>>> Now I wish to add those patches to my git local repo, so they can
>>> uploaded
>>> to gerrit. What I have to do? What steps next?
>>
>>
>> For the OpenOCD-specific instructions, please follow the HACKING file
>> to set up a gerrit account, connect your git repo to it and push your
>> local commits to gerrit. For general git help, read below.
>>
> I have already a gerrit account, I modified my ssh local keys to match those
> key given to me during account setup.
> What you mean with: "connect your git repo to gerrit account" ?

Just the above, plus downloading the commit hook. Just follow HACKING,
everything's there.

> and even worse: "push your commits to gerrit"? Even without creating any
> patch or patchset?
>
>>> How I can produce a patch to be checked by tools/checkpatch.sh ?
>>
>>
>> Once you have created the commit in your repo, you're ready to run
>> checkpatch. If you have more than one commit, you can specify a
>> reference as a parameter to checkpatch (eg "master") and all patches
>> since then will be checked.
>>
> Ok, so step n.1 will be:
> - connect your git repo to gerrit && push your commits to gerrit
>
> Is it right?

Not quite. I described what you needed to to, but not the order you
should do it in. I think that will be obvious after learning the
basics of git. The basics are already described in order in HACKING,
but let me expand on it a bit. If you don't understand some of the
below steps, check HACKING for details or read up on git basics.

There are many steps but I think you have already done to step 5, but
you probably skipped 4. No worries, you can probably do 4 after 5 (but
before 6).

1. Clone the repo
2. Set up connection to gerrit (ssh keys and commit-hook etc) and
username and email settings of git.
3. Check out the starting point of your changes (git checkout
some_ref). You could do what you did before, fetching the patch from
gerrit and checking it out with FETCH_HEAD. But since then, the SPIFI
driver has been merged into master, so your starting point should be
master, but it doesn't matter much in this case since you can rebase
later. The rebase should be trivial unless the merged SPIFI driver was
significantly different from the one you worked on.
4. Create a branch from the starting point to hold your commits (git
checkout -b some_name). This is not strictly necessary but convenient,
especially if you started with FETCH_HEAD, since it's hard to
reference your starting point if it doesn't have a name. (FETCH_HEAD
is just a temporary name for the last fetch and may change later).
5. Do your edits until you're satisfied, compiling and testing as you go.
6. Stage your edits (git add some_file).
7. Create the commit (git commit -s). Compose a relevant commit
message and make sure the -s option added the Signed-off-by-line. I
prefer to do steps 6 and 7 using git gui instead of command line, for
better overview.
8. Repeat from 5, creating one commit for each logical change. In your
case I guess you only need one commit.
9. Check your commit(s) since the starting point for style erros
(tools/checkpatch.sh some_name).
10. If there are errors, repeat from 5, but amend your commit instead
of creating a new one by using "git commit -a" instead in step 7. (If
you have multiple commits and the error is not in the last one, check
instructions on how to do an interactive rebase (fixup). I think you
won't need it here.)
11. Push your commits to gerrit (git push review).
12. Watch your inbox or gerrit for feedback. Ping if nothing happens
for some weeks.

Done.

> I will try to catch the basics, but if I know the procedure in a
> collection-of-a-scripts(commands) form it will be better...

It should be possible to follow the above steps successfully without
learning anything, if that's what you want.

Best regards,
Andreas

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to