Hi,
I'd like to commit a patch to coreboot. I've followed the tutorials on https://doc.coreboot.org/tutorial/part2.html
I've set up gerrit account, etc. created a local repo, configured git for submit, set up change-id hook, etc. etc. etc. However at step 4a, "git push", I got an error message from the server about missing "Push" rights and to contact the administrator. How can I do that?
I was able to push the commit as a private patch: https://review.coreboot.org/c/coreboot/+/45480
I'm not sure if you can see this url, or is this for my user only. I guess now I should add a reviewer, but how and who? Or how can I get a "Push" right?
Thanks for your help, bzt
Hi,
Please check out also this guide: https://www.coreboot.org/Git#Pushing_changes
you need to tell git where to push: `HEAD:refs/for/master`. It seems the guide on https://doc.coreboot.org/tutorial/part2.html is missing one crucial step:
`git config remote.origin.push HEAD:refs/for/master`
You don't need any particular rights to push. You have two options to authorize:
1. SSH key (add SSH key to gerrit account and configure git remote for SSH or simply clone with SSH like here https://www.coreboot.org/Git#Accessing_the_repository) 2. HTTP password. If you cloned the repo by HTTP(S) then you should be asked for password. You can generate it on your gerrit account.
Even if you skip the git config commands, `git push origin HEAD:refs/for/master` should push your commit(s) you have added on top of your local master branch to gerrit. They will be public. if you append %private at the end of the command, it will be private. If you append %wip it will be marked as work in progress.
Of course we can't see it if it is private. You would have to add reviewers or people on CC.
Who to add as reviewer? It depends what the patch does. You may suggest reviewers by looking at MAINTAINERS file in the repo which contains the people who are more familiar with given part of coreboot source and can provide good reviews.
How to add reviewer? If your press reply button above the commit message on gerrit (when displaying your patch) a window will pop up. You may skip writing any message. Just click in the row with reviewers (where Add reviewer is written) and start typing. Auto completion should give you some results. Type by name, nick or email of the reviewer.
Best regards,
Hi,
On Thu, Sep 17, 2020 at 2:50 PM Michal Zygowski michal.zygowski@3mdeb.com wrote:
Hi,
Please check out also this guide: https://www.coreboot.org/Git#Pushing_changes
you need to tell git where to push: `HEAD:refs/for/master`. It seems the guide on https://doc.coreboot.org/tutorial/part2.html is missing one crucial step:
`git config remote.origin.push HEAD:refs/for/master`
This shouldn't be needed after running `make gitconfig`.
You don't need any particular rights to push. You have two options to authorize:
- SSH key (add SSH key to gerrit account and configure git remote for
SSH or simply clone with SSH like here https://www.coreboot.org/Git#Accessing_the_repository) 2. HTTP password. If you cloned the repo by HTTP(S) then you should be asked for password. You can generate it on your gerrit account.
Even if you skip the git config commands, `git push origin HEAD:refs/for/master` should push your commit(s) you have added on top of your local master branch to gerrit. They will be public. if you append %private at the end of the command, it will be private. If you append %wip it will be marked as work in progress.
Of course we can't see it if it is private. You would have to add reviewers or people on CC.
You can also `unmark private` on the change. This way, everyone can take a look. Note that private changes can't be submitted normally.
https://gerritcodereview-test.gsrc.io/marking-a-change-as-private.html
Who to add as reviewer? It depends what the patch does. You may suggest reviewers by looking at MAINTAINERS file in the repo which contains the people who are more familiar with given part of coreboot source and can provide good reviews.
How to add reviewer? If your press reply button above the commit message on gerrit (when displaying your patch) a window will pop up. You may skip writing any message. Just click in the row with reviewers (where Add reviewer is written) and start typing. Auto completion should give you some results. Type by name, nick or email of the reviewer.
Best regards,
-- Michał Żygowski Firmware Engineer https://3mdeb.com | @3mdeb_com
On 17.09.2020 16:36, bzt wrote:
Hi,
I'd like to commit a patch to coreboot. I've followed the tutorials on https://doc.coreboot.org/tutorial/part2.html
I've set up gerrit account, etc. created a local repo, configured git for submit, set up change-id hook, etc. etc. etc. However at step 4a, "git push", I got an error message from the server about missing "Push" rights and to contact the administrator. How can I do that?
I was able to push the commit as a private patch: https://review.coreboot.org/c/coreboot/+/45480
I'm not sure if you can see this url, or is this for my user only. I guess now I should add a reviewer, but how and who? Or how can I get a "Push" right?
I can't see it. You can `unmark private` on the change so that everyone can see it.
Thanks for your help, bzt _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
Best regards, Angel
Thank you very much!
I've tried "git push origin HEAD:refs/for/master" but didn't work. I've decided to start everything over, cloned the repo again, etc. I was able to push this time, however it is not clear why, since the two configurations are identical, look:
$ diff coreboot-old/.git/config coreboot/.git/config $
Anyway, the push was successful. https://review.coreboot.org/c/coreboot/+/45482
Now I have a different problem. Sorry, I'm used to github, I'm new to gerrit. After Jenkins run, it reported an empty line at the end of one file. I've fixed that, commit+push again. I though that's the normal flow for fixing. But it created a new PR: https://review.coreboot.org/c/coreboot/+/45483
And this time it gives me "Merge conflict" error (obviously). How am I supposed to fix a PR? I guessed it's better to ask before I try anything else. I'm really sorry for these questions and the extra PR! I looked for a delete button or something but couldn't find any.
Cheers, bzt
On 9/17/20, Angel Pons th3fanbus@gmail.com wrote:
Hi,
On Thu, Sep 17, 2020 at 2:50 PM Michal Zygowski michal.zygowski@3mdeb.com wrote:
Hi,
Please check out also this guide: https://www.coreboot.org/Git#Pushing_changes
you need to tell git where to push: `HEAD:refs/for/master`. It seems the guide on https://doc.coreboot.org/tutorial/part2.html is missing one crucial step:
`git config remote.origin.push HEAD:refs/for/master`
This shouldn't be needed after running `make gitconfig`.
You don't need any particular rights to push. You have two options to authorize:
- SSH key (add SSH key to gerrit account and configure git remote for
SSH or simply clone with SSH like here https://www.coreboot.org/Git#Accessing_the_repository) 2. HTTP password. If you cloned the repo by HTTP(S) then you should be asked for password. You can generate it on your gerrit account.
Even if you skip the git config commands, `git push origin HEAD:refs/for/master` should push your commit(s) you have added on top of your local master branch to gerrit. They will be public. if you append %private at the end of the command, it will be private. If you append %wip it will be marked as work in progress.
Of course we can't see it if it is private. You would have to add reviewers or people on CC.
You can also `unmark private` on the change. This way, everyone can take a look. Note that private changes can't be submitted normally.
https://gerritcodereview-test.gsrc.io/marking-a-change-as-private.html
Who to add as reviewer? It depends what the patch does. You may suggest reviewers by looking at MAINTAINERS file in the repo which contains the people who are more familiar with given part of coreboot source and can provide good reviews.
How to add reviewer? If your press reply button above the commit message on gerrit (when displaying your patch) a window will pop up. You may skip writing any message. Just click in the row with reviewers (where Add reviewer is written) and start typing. Auto completion should give you some results. Type by name, nick or email of the reviewer.
Best regards,
-- Michał Żygowski Firmware Engineer https://3mdeb.com | @3mdeb_com
On 17.09.2020 16:36, bzt wrote:
Hi,
I'd like to commit a patch to coreboot. I've followed the tutorials on https://doc.coreboot.org/tutorial/part2.html
I've set up gerrit account, etc. created a local repo, configured git for submit, set up change-id hook, etc. etc. etc. However at step 4a, "git push", I got an error message from the server about missing "Push" rights and to contact the administrator. How can I do that?
I was able to push the commit as a private patch: https://review.coreboot.org/c/coreboot/+/45480
I'm not sure if you can see this url, or is this for my user only. I guess now I should add a reviewer, but how and who? Or how can I get a "Push" right?
I can't see it. You can `unmark private` on the change so that everyone can see it.
Thanks for your help, bzt _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
Best regards, Angel _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
No worries, Gerrit uses the 'Change-Id' line to distinguish between different PRs/patches. Did you remove the Change-Id line when editing the commit? Cheers, -Tim
On Thu, Sep 17, 2020 at 12:15 PM bzt bztemail@gmail.com wrote:
Thank you very much!
I've tried "git push origin HEAD:refs/for/master" but didn't work. I've decided to start everything over, cloned the repo again, etc. I was able to push this time, however it is not clear why, since the two configurations are identical, look:
$ diff coreboot-old/.git/config coreboot/.git/config $
Anyway, the push was successful. https://review.coreboot.org/c/coreboot/+/45482
Now I have a different problem. Sorry, I'm used to github, I'm new to gerrit. After Jenkins run, it reported an empty line at the end of one file. I've fixed that, commit+push again. I though that's the normal flow for fixing. But it created a new PR: https://review.coreboot.org/c/coreboot/+/45483
And this time it gives me "Merge conflict" error (obviously). How am I supposed to fix a PR? I guessed it's better to ask before I try anything else. I'm really sorry for these questions and the extra PR! I looked for a delete button or something but couldn't find any.
Cheers, bzt
On 9/17/20, Angel Pons th3fanbus@gmail.com wrote:
Hi,
On Thu, Sep 17, 2020 at 2:50 PM Michal Zygowski michal.zygowski@3mdeb.com wrote:
Hi,
Please check out also this guide: https://www.coreboot.org/Git#Pushing_changes
you need to tell git where to push: `HEAD:refs/for/master`. It seems the guide on https://doc.coreboot.org/tutorial/part2.html is missing one crucial step:
`git config remote.origin.push HEAD:refs/for/master`
This shouldn't be needed after running `make gitconfig`.
You don't need any particular rights to push. You have two options to authorize:
- SSH key (add SSH key to gerrit account and configure git remote for
SSH or simply clone with SSH like here https://www.coreboot.org/Git#Accessing_the_repository) 2. HTTP password. If you cloned the repo by HTTP(S) then you should be asked for password. You can generate it on your gerrit account.
Even if you skip the git config commands, `git push origin HEAD:refs/for/master` should push your commit(s) you have added on top of your local master branch to gerrit. They will be public. if you append %private at the end of the command, it will be private. If you append %wip it will be marked as work in progress.
Of course we can't see it if it is private. You would have to add reviewers or people on CC.
You can also `unmark private` on the change. This way, everyone can take a look. Note that private changes can't be submitted normally.
https://gerritcodereview-test.gsrc.io/marking-a-change-as-private.html
Who to add as reviewer? It depends what the patch does. You may suggest reviewers by looking at MAINTAINERS file in the repo which contains the people who are more familiar with given part of coreboot source and can provide good reviews.
How to add reviewer? If your press reply button above the commit message on gerrit (when displaying your patch) a window will pop up. You may skip writing any message. Just click in the row with reviewers (where Add reviewer is written) and start typing. Auto completion should give you some results. Type by name, nick or email of the reviewer.
Best regards,
-- Michał Żygowski Firmware Engineer https://3mdeb.com | @3mdeb_com
On 17.09.2020 16:36, bzt wrote:
Hi,
I'd like to commit a patch to coreboot. I've followed the tutorials on https://doc.coreboot.org/tutorial/part2.html
I've set up gerrit account, etc. created a local repo, configured git for submit, set up change-id hook, etc. etc. etc. However at step 4a, "git push", I got an error message from the server about missing "Push" rights and to contact the administrator. How can I do that?
I was able to push the commit as a private patch: https://review.coreboot.org/c/coreboot/+/45480
I'm not sure if you can see this url, or is this for my user only. I guess now I should add a reviewer, but how and who? Or how can I get a "Push" right?
I can't see it. You can `unmark private` on the change so that everyone can see it.
Thanks for your help, bzt _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
Best regards, Angel _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
bzt wrote:
After Jenkins run, it reported an empty line at the end of one file. I've fixed that, commit+push again. I though that's the normal flow for fixing. But it created a new PR: https://review.coreboot.org/c/coreboot/+/45483
And this time it gives me "Merge conflict" error (obviously). How am I supposed to fix a PR?
By amending the original commit locally, keeping the original Change-Id line in the commit message, and pushing again.
"Amend" is a specific git operation which replaces one commit with another commit with different (usually additional) changes.
Rather than running 'git commit' to create a second commit on top of the first, you can run 'git commit --amend' to create a new commit that replaces the first, with the newly created commit adding more stuff to (or removing an empty line from) the first.
Git lets you edit the commit message for the new commit as usual, but defaults to suggest the commit message that you created for the original commit, and that should already include the Change-Id line.
If you are careful to retain that line, Gerrit then knows that this new commit is a fixed version of the previous change.
Kind regards
//Peter
PS: To fix this situation at f238414, you could run git rebase -i 8d1b6be^ and change "commit" in the f238414 line to "fixup", then save and exit. Git should then combine the two commits into one, as had you amended.
Thank you! Good to know!
I think the problem was I never edit the commit message. I always use "-m" because I'm more of a command line guy. I'll change my habit!
Sorry again about the accidental extra PR.
Cheers, bzt
On 9/18/20, Peter Stuge peter@stuge.se wrote:
bzt wrote:
After Jenkins run, it reported an empty line at the end of one file. I've fixed that, commit+push again. I though that's the normal flow for fixing. But it created a new PR: https://review.coreboot.org/c/coreboot/+/45483
And this time it gives me "Merge conflict" error (obviously). How am I supposed to fix a PR?
By amending the original commit locally, keeping the original Change-Id line in the commit message, and pushing again.
"Amend" is a specific git operation which replaces one commit with another commit with different (usually additional) changes.
Rather than running 'git commit' to create a second commit on top of the first, you can run 'git commit --amend' to create a new commit that replaces the first, with the newly created commit adding more stuff to (or removing an empty line from) the first.
Git lets you edit the commit message for the new commit as usual, but defaults to suggest the commit message that you created for the original commit, and that should already include the Change-Id line.
If you are careful to retain that line, Gerrit then knows that this new commit is a fixed version of the previous change.
Kind regards
//Peter
PS: To fix this situation at f238414, you could run git rebase -i 8d1b6be^ and change "commit" in the f238414 line to "fixup", then save and exit. Git should then combine the two commits into one, as had you amended. _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
bzt wrote:
Thank you! Good to know!
Glad it made sense.
I think the problem was I never edit the commit message.
The problem was that you didn't use --amend for the second commit.
I always use "-m" because I'm more of a command line guy. I'll change my habit!
You can still use -m together with --amend, but if you know that you want to keep the commit message unchanged then you can use -M HEAD instead, to skip the editor:
git clone
## first try # edit somefile git add somefile git commit -m 'somfile: Changes' # push to gerrit, receive feedback
## second try # edit somefile again git add somefile git commit --amend -M HEAD # push to gerrit again
Sorry again about the accidental extra PR.
Don't worry about that, no problem at all.
//Peter