Posting a patch?
Hi all,
is there a guideline or manual how to send a patch to the qemu mailing list? It seems as if this can be done somehow automagically using the local git repository, but I didn't find a tool to do that.
Thanks!
Best regards,
Erik
Am 14.05.2012 22:12, schrieb Erik Rull:
Quoted 9 lines
Hi all,
is there a guideline or manual how to send a patch to the qemu mailing list? It seems as if this can be done somehow automagically using the local git repository, but I didn't find a tool to do that.
Thanks!
Best regards,
Erik
Hi Erik,
if you use git for sending, you don't risk that your mailer destroys the format of your patch. I usually use these commands to send a single patch from the QEMU source directory:
# Create the patch file (name depends on the subject line of your
patch).
git format-patch HEAD^
# Check the patch (fix any issues which were found). scripts/checkpatch.pl 0001-*
# Get the maintainer who is responsible (there is not always one). scripts/get_maintainer.pl 0001-*
# Send the patch.
git send-email --to [email protected] --to "n.n
<address@domain>" 0001-*
Please read also http://wiki.qemu.org/Contribute/SubmitAPatch.
Regards,
Stefan W.
Quoted 5 lines · Stefan Weil
if you use git for sending, you don't risk that your mailer destroys the format of your patch.
I usually use these commands to send a single patch from the QEMU source directory:
Quoted 9 lines
# Create the patch file (name depends on the subject line of your patch). git format-patch HEAD^
# Check the patch (fix any issues which were found).scripts/checkpatch.pl0001-*
# Get the maintainer who is responsible (there is not always one).scripts/get_maintainer.pl0001-*
# Send the patch.
git send-email --to [email protected] --to "n.n <address@domain>" 0001-*
If you do this more than once in the same git tree you'll regret it :-) ("git send-email 0001-*" will happily retransmit all the old 0001-foo patches along with the new one...) I use git-format-patch's -o option to put my sent patches in a separate directory so they don't clutter up the working tree.
Quoted 1 line
Please read also http://wiki.qemu.org/Contribute/SubmitAPatch.
I've updated the wiki page to mention git format-patch and git send-email. Does anybody have a link to a decent short tutorial on how to use them? If so, I think it would probably be helpful for us to put a link on the SubmitAPatch page.
-- PMM
Quoted 16 lines · Peter Maydell
Quoted 5 lines · Stefan Weil
if you use git for sending, you don't risk that your mailer destroys the format of your patch.
I usually use these commands to send a single patch from the QEMU source directory:Quoted 9 lines
# Create the patch file (name depends on the subject line of your patch). git format-patch HEAD^
# Check the patch (fix any issues which were found).scripts/checkpatch.pl0001-*
# Get the maintainer who is responsible (there is not always one).scripts/get_maintainer.pl0001-*
# Send the patch.
git send-email --to [email protected] --to "n.n<address@domain>"
0001-*
Quoted 5 lines
If you do this more than once in the same git tree you'll regret it :-) ("git send-email 0001-*" will happily retransmit all the old 0001-foo patches along with the new one...) I use git-format-patch's -o option to put my sent patches in a separate directory so they don't clutter up the working tree.
You can also do:
git send-email [email protected] HEAD~1
Which avoids any clutter.
Regards,
Anthony Liguori
Quoted 10 lines
Quoted 2 lines
Please read also http://wiki.qemu.org/Contribute/SubmitAPatch.
I've updated the wiki page to mention git format-patch and git send-email. Does anybody have a link to a decent short tutorial on how to use them? If so, I think it would probably be helpful for us to put a link on the SubmitAPatch page.
-- PMM
Quoted 5 lines · Anthony Liguori
You can also do:
git send-email [email protected] HEAD~1
Which avoids any clutter.
I also like to do:
git config [email protected]
so I don't have to remember to use --to every time.
'git send-email --cover-letter' gives a nicer cover letter than 'git send-email --compose'; it really bothers me that 'git send-email --help' fails to mention that send-email also understands all options of format-patch.
Signature · 2 lines
Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 29 lines · Stefan Weil
Am 14.05.2012 22:12, schrieb Erik Rull:
Quoted 11 lines
Hi all,
is there a guideline or manual how to send a patch to the qemu mailing list? It seems as if this can be done somehow automagically using the local git repository, but I didn't find a tool to do that.
Thanks!
Best regards,
Erik
Hi Erik,
if you use git for sending, you don't risk that your mailer destroys the format of your patch.
I usually use these commands to send a single patch from the QEMU source directory:# Create the patch file (name depends on the subject line of your patch). git format-patch HEAD^
# Check the patch (fix any issues which were found).scripts/checkpatch.pl0001-*
# Get the maintainer who is responsible (there is not always one).scripts/get_maintainer.pl0001-*
# Send the patch.
git send-email --to [email protected] --to "n.n <address@domain>" 0001-*
Quoted 6 lines
Please read also http://wiki.qemu.org/Contribute/SubmitAPatch.
Regards,
Stefan W.
Thanks!
So I started a git pull to get the latest master and as well a git reset --hard to assert that there are no modifications remaining.
Then I modified the file ui/x_keymap.c and called then the git format-patch HEAD^
But I get 3 patches that are definitively not related to my changes:
erik@debian:~/qemu-test/qemu$ git format-patch HEAD^ 0001-coroutine-Fix-setup-of-sigaltstack-coroutines.patch 0002-qcow2-Don-t-ignore-failure-to-clear-autoclear-flags.patch 0003-qemu-img-Fix-segmentation-fault.patch erik@debian:~/qemu-test/qemu$
Using git diff shows my real changes...
So I created a patch file called keymap.patch but git format-patch HEAD^ just ignores it..
Maybe I missed something important...
Best regards,
Erik
Am 14.05.2012 22:58, schrieb Anthony Liguori:
Quoted 25 lines · Peter Maydell
Quoted 18 lines · Stefan Weil
Quoted 5 lines
if you use git for sending, you don't risk that your mailer destroys the format of your patch.
I usually use these commands to send a single patch from the QEMU source directory:Quoted 11 lines
# Create the patch file (name depends on the subject line of
your patch).
git format-patch HEAD^
# Check the patch (fix any issues which were found).scripts/checkpatch.pl0001-*
# Get the maintainer who is responsible (there is not always one).scripts/get_maintainer.pl0001-*
# Send the patch.
git send-email --to [email protected] --to
"n.n<address@domain>"
0001-*Quoted 5 lines
If you do this more than once in the same git tree you'll regret it :-) ("git send-email 0001-*" will happily retransmit all the old 0001-foo patches along with the new one...) I use git-format-patch's -o option to put my sent patches in a separate directory so they don't clutter up the working tree.
Quoted 5 lines
You can also do:
git send-email [email protected] HEAD~1
Which avoids any clutter.
... and also avoids nasty messages from checkpatch.pl :-)
But as this method tends to add clutter to the qemu code or to the mailing list, it should be avoided.
Quoted 4 lines
Regards,
Anthony Liguori
Cheers,
Stefan W.
Quoted 9 lines · Eric Blake
Quoted 5 lines · Anthony Liguori
You can also do:
git send-email [email protected] HEAD~1
Which avoids any clutter.
I also like to do:
Quoted 9 lines
git config [email protected]
so I don't have to remember to use --to every time.
'git send-email --cover-letter' gives a nicer cover letter than 'git send-email --compose'; it really bothers me that 'git send-email --help' fails to mention that send-email also understands all options of format-patch.
Thanks for your help. I need to figure out first, why git detects other changes than mine for posting despite a git checkout master, git pull, git reset --hard and make distclean. (See previous email)
Best regards,
Erik
Am 14.05.2012 23:06, schrieb Erik Rull:
Quoted 17 lines
Thanks!
So I started a git pull to get the latest master and as well a git reset --hard to assert that there are no modifications remaining.
Then I modified the file
ui/x_keymap.cand called then the git format-patch HEAD^But I get 3 patches that are definitively not related to my changes:
erik@debian:~/qemu-test/qemu$ git format-patch HEAD^ 0001-coroutine-Fix-setup-of-sigaltstack-coroutines.patch 0002-qcow2-Don-t-ignore-failure-to-clear-autoclear-flags.patch 0003-qemu-img-Fix-segmentation-fault.patch erik@debian:~/qemu-test/qemu$Using git diff shows my real changes...
Quoted 8 lines
So I created a patch file called keymap.patch but git format-patch HEAD^ just ignores it..
Maybe I missed something important...
Best regards,
Erik
You must commit your local change before you can format a patch.
Regards,
Stefan W.
Am 14.05.2012 22:53, schrieb Peter Maydell:
Quoted 17 lines · Stefan Weil
Quoted 6 lines
if you use git for sending, you don't risk that your mailer destroys the format of your patch.
I usually use these commands to send a single patch from the QEMU source directory:Quoted 10 lines
# Create the patch file (name depends on the subject line of your patch). git format-patch HEAD^
# Check the patch (fix any issues which were found).scripts/checkpatch.pl0001-*
# Get the maintainer who is responsible (there is not always one).scripts/get_maintainer.pl0001-*
# Send the patch.
git send-email --to [email protected] --to "n.n<address@domain>"
0001-*
Quoted 6 lines
If you do this more than once in the same git tree you'll regret it :-) ("git send-email 0001-*" will happily retransmit all the old 0001-foo patches along with the new one...) I use git-format-patch's -o option to put my sent patches in a separate directory so they don't clutter up the working tree.
That's why git send-email asks before sending an email. :-)
If there are several files which match 0001-*, it will ask for each of them.
Quoted 9 lines
Quoted 2 lines
Please read also http://wiki.qemu.org/Contribute/SubmitAPatch.
I've updated the wiki page to mention git format-patch and git send-email. Does anybody have a link to a decent short tutorial on how to use them? If so, I think it would probably be helpful for us to put a link on the SubmitAPatch page.
-- PMM
I just added links to the man pages.
Of course a tutorial would be even better.
Regards,
Stefan W.
Am 14.05.2012 23:10, schrieb Erik Rull:
Quoted 20 lines
Quoted 9 lines · Eric Blake
Quoted 5 lines · Anthony Liguori
You can also do:
git send-email [email protected] HEAD~1
Which avoids any clutter.
I also like to do:
Quoted 9 lines
git config [email protected]
so I don't have to remember to use --to every time.
'git send-email --cover-letter' gives a nicer cover letter than 'git send-email --compose'; it really bothers me that 'git send-email --help' fails to mention that send-email also understands all options of format-patch.
Quoted 7 lines
Thanks for your help. I need to figure out first, why git detects other changes than mine for posting despite a git checkout master, git pull, git reset --hard and make distclean. (See previous email)
Best regards,
Erik
Hi Erik,
I read your previous mail.
"git diff" shows the un-committed changes in your local git repository. "git format-patch" formats the latest changes in your local git repository.
If you don't commit your own change to your local git repository, "git format-patch" will format the latest changes from someone else.
As long as "git diff" shows your changes, there is no use to run "git format-patch".
Regards,
Stefan W.
Quoted 41 lines · Stefan Weil
Am 14.05.2012 23:10, schrieb Erik Rull:
Quoted 20 lines
Quoted 9 lines · Eric Blake
Quoted 5 lines · Anthony Liguori
You can also do:
git send-email [email protected] HEAD~1
Which avoids any clutter.
I also like to do:
Quoted 9 lines
git config [email protected]
so I don't have to remember to use --to every time.
'git send-email --cover-letter' gives a nicer cover letter than 'git send-email --compose'; it really bothers me that 'git send-email --help' fails to mention that send-email also understands all options of format-patch.
Quoted 9 lines
Thanks for your help. I need to figure out first, why git detects other changes than mine for posting despite a git checkout master, git pull, git reset --hard and make distclean.
(See previous email)Best regards,
Erik
Hi Erik,
I read your previous mail.
"git diff" shows the un-committed changes in your local git repository. "git format-patch" formats the latest changes in your local git repository.
If you don't commit your own change to your local git repository, "git format-patch" will format the latest changes from someone else.
Quoted 8 lines
As long as "git diff" shows your changes, there is no use to run "git format-patch".
Regards,
Stefan W.
Thanks a lot!
There is still some improvement possible in my git knowledge :-)
I just handled to post the first patch, but my sendmail is not yet configured for outgoing emails ;-)
So this is my next task...
But meanwhile I will just post it using my windows mail client.
Best regards,
Erik
Quoted 4 lines · Stefan Weil
That's why git send-email asks before sending an email. :-)
If there are several files which match 0001-*, it will ask for each of them.
The default setting for --confirm is 'auto' which means it will only ask if you used the --compose option or send-email pulled a CC address out of the patch.
-- PMM