[Development] Seeking advise using git and code review
Samuel Gaist
samuel.gaist at edeltech.ch
Wed Oct 4 09:18:55 CEST 2017
> On 4 Oct 2017, at 08:55, Daniel Savi <daniel.savi at gaess.ch> wrote:
>
> Hello everybody
Hi and welcome new contributor :)
>
> I've just pushed my first commit to QtGui, trying to follow the contribution guidelines posted here http://wiki.qt.io/Qt_Contribution_Guidelines. Now I have some questions regarding the process. It seems that I have done it at least partly wrong ;-)
>
> The codereview to my changes is as follows: https://codereview.qt-project.org/#/c/207540/
>
> After pushing my changes, the sanity bot found some typos in my commit message. Now, how would I proceed? Do I change the commit message? If so, how would I do that?
Edit the commit message on your machine and push again to the code review server the same way you did the first time. The Change-Id that has been added to the commit message will serve as identifier so your new version of the patch will be appended to the review.
>
> Another probably more serious problem: I've checked out the source for 5.10 and created a branch "myfix5.10" and used "git checkout myfix5.10". Then I mad a diff to my locally changed files in another directory and patched the files from 5.10 in a temporary folder. After checking that the patched files looked how they should, I copied them back to the original folder. Then I did a "git commit -a". When checking the branch with "git branch", I found that I was on a detached head now. I couldn't go back to the branch, because git told me that I would lose my changes. So I pushed them anyway. Now, my submit type in Gerrit is "cherry pick". What should I have done, when encountering the detached head state? Is the "cherry pick" type a problem?
If you are in a detached state: git checkout -b branch_name, this will create a new branch from where you are and change to it directly keeping your commit(s).
What you see on the gerrit page is the command list to cherry-pick the patch for anybody who would like to either test it, improve on it etc. You can click on the other possibilities depending on the git workflow you want to use.
>
> Third and last, I didn't know how to find reviewers so I picked some almost randomly from the git log and added the QtGui maintainer, too. Probably not such a good idea? How could I find reviewers for my changes to QTextDocumentWriter?
Usually, take a look at the log of the files you modified to see who reviewed the last changes excluding the copyright updates. If nothing moved after some times or if the reviewer(s) associated are no longer active, add the module maintainer.
>
> Sorry for the lengthy post.
>
It’s fine.
Cheers
Samuel
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.qt-project.org/pipermail/development/attachments/20171004/61f7a030/attachment.sig>
More information about the Development
mailing list