* [Qemu-devel] Posting a patch?
@ 2012-05-14 20:12 Erik Rull
2012-05-14 20:30 ` Stefan Weil
0 siblings, 1 reply; 13+ messages in thread
From: Erik Rull @ 2012-05-14 20:12 UTC (permalink / raw)
To: qemu-devel@nongnu.org
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 20:12 [Qemu-devel] Posting a patch? Erik Rull
@ 2012-05-14 20:30 ` Stefan Weil
2012-05-14 20:53 ` Peter Maydell
2012-05-14 21:06 ` Erik Rull
0 siblings, 2 replies; 13+ messages in thread
From: Stefan Weil @ 2012-05-14 20:30 UTC (permalink / raw)
To: Erik Rull; +Cc: qemu-devel@nongnu.org
Am 14.05.2012 22:12, schrieb Erik Rull:
> 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 qemu-devel@nongnu.org --to "n.n
<address@domain>" 0001-*
Please read also http://wiki.qemu.org/Contribute/SubmitAPatch.
Regards,
Stefan W.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 20:30 ` Stefan Weil
@ 2012-05-14 20:53 ` Peter Maydell
2012-05-14 20:58 ` Anthony Liguori
2012-05-14 21:14 ` Stefan Weil
2012-05-14 21:06 ` Erik Rull
1 sibling, 2 replies; 13+ messages in thread
From: Peter Maydell @ 2012-05-14 20:53 UTC (permalink / raw)
To: Stefan Weil; +Cc: Erik Rull, qemu-devel@nongnu.org
On 14 May 2012 21:30, Stefan Weil <sw@weilnetz.de> wrote:
> 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 qemu-devel@nongnu.org --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.
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 20:53 ` Peter Maydell
@ 2012-05-14 20:58 ` Anthony Liguori
2012-05-14 21:04 ` Eric Blake
2012-05-14 21:08 ` Stefan Weil
2012-05-14 21:14 ` Stefan Weil
1 sibling, 2 replies; 13+ messages in thread
From: Anthony Liguori @ 2012-05-14 20:58 UTC (permalink / raw)
To: Peter Maydell; +Cc: Stefan Weil, qemu-devel@nongnu.org, Erik Rull
On 05/14/2012 03:53 PM, Peter Maydell wrote:
> On 14 May 2012 21:30, Stefan Weil<sw@weilnetz.de> wrote:
>> 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 qemu-devel@nongnu.org --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.
You can also do:
git send-email --to=qemu-devel@nongnu.org HEAD~1
Which avoids any clutter.
Regards,
Anthony Liguori
>
>> 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
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 20:58 ` Anthony Liguori
@ 2012-05-14 21:04 ` Eric Blake
2012-05-14 21:10 ` Erik Rull
2012-05-14 21:08 ` Stefan Weil
1 sibling, 1 reply; 13+ messages in thread
From: Eric Blake @ 2012-05-14 21:04 UTC (permalink / raw)
To: Anthony Liguori
Cc: Peter Maydell, Erik Rull, qemu-devel@nongnu.org, Stefan Weil
[-- Attachment #1: Type: text/plain, Size: 621 bytes --]
On 05/14/2012 02:58 PM, Anthony Liguori wrote:
> You can also do:
>
> git send-email --to=qemu-devel@nongnu.org HEAD~1
>
> Which avoids any clutter.
I also like to do:
git config sendemail.to=qemu-devel@nongnu.org
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.
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 21:04 ` Eric Blake
@ 2012-05-14 21:10 ` Erik Rull
2012-05-14 21:20 ` Stefan Weil
0 siblings, 1 reply; 13+ messages in thread
From: Erik Rull @ 2012-05-14 21:10 UTC (permalink / raw)
To: Eric Blake
Cc: Peter Maydell, qemu-devel@nongnu.org, Anthony Liguori,
Stefan Weil
Eric Blake wrote:
> On 05/14/2012 02:58 PM, Anthony Liguori wrote:
>> You can also do:
>>
>> git send-email --to=qemu-devel@nongnu.org HEAD~1
>>
>> Which avoids any clutter.
>
> I also like to do:
>
> git config sendemail.to=qemu-devel@nongnu.org
>
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 21:10 ` Erik Rull
@ 2012-05-14 21:20 ` Stefan Weil
2012-05-14 21:29 ` Erik Rull
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Weil @ 2012-05-14 21:20 UTC (permalink / raw)
To: Erik Rull; +Cc: Peter Maydell, qemu-devel@nongnu.org, Anthony Liguori
Am 14.05.2012 23:10, schrieb Erik Rull:
> Eric Blake wrote:
>> On 05/14/2012 02:58 PM, Anthony Liguori wrote:
>>> You can also do:
>>>
>>> git send-email --to=qemu-devel@nongnu.org HEAD~1
>>>
>>> Which avoids any clutter.
>>
>> I also like to do:
>>
>> git config sendemail.to=qemu-devel@nongnu.org
>>
>> 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
>
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 21:20 ` Stefan Weil
@ 2012-05-14 21:29 ` Erik Rull
0 siblings, 0 replies; 13+ messages in thread
From: Erik Rull @ 2012-05-14 21:29 UTC (permalink / raw)
To: Stefan Weil; +Cc: Peter Maydell, qemu-devel@nongnu.org, Anthony Liguori
Stefan Weil wrote:
> Am 14.05.2012 23:10, schrieb Erik Rull:
>> Eric Blake wrote:
>>> On 05/14/2012 02:58 PM, Anthony Liguori wrote:
>>>> You can also do:
>>>>
>>>> git send-email --to=qemu-devel@nongnu.org HEAD~1
>>>>
>>>> Which avoids any clutter.
>>>
>>> I also like to do:
>>>
>>> git config sendemail.to=qemu-devel@nongnu.org
>>>
>>> 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
>>
>
> 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.
>
>
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 20:58 ` Anthony Liguori
2012-05-14 21:04 ` Eric Blake
@ 2012-05-14 21:08 ` Stefan Weil
1 sibling, 0 replies; 13+ messages in thread
From: Stefan Weil @ 2012-05-14 21:08 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Peter Maydell, qemu-devel@nongnu.org, Erik Rull
Am 14.05.2012 22:58, schrieb Anthony Liguori:
> On 05/14/2012 03:53 PM, Peter Maydell wrote:
>> On 14 May 2012 21:30, Stefan Weil<sw@weilnetz.de> wrote:
>>> 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 qemu-devel@nongnu.org --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.
>
> You can also do:
>
> git send-email --to=qemu-devel@nongnu.org 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.
>
> Regards,
>
> Anthony Liguori
Cheers,
Stefan W.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 20:53 ` Peter Maydell
2012-05-14 20:58 ` Anthony Liguori
@ 2012-05-14 21:14 ` Stefan Weil
2012-05-15 10:18 ` Peter Maydell
1 sibling, 1 reply; 13+ messages in thread
From: Stefan Weil @ 2012-05-14 21:14 UTC (permalink / raw)
To: Peter Maydell; +Cc: Erik Rull, qemu-devel@nongnu.org
Am 14.05.2012 22:53, schrieb Peter Maydell:
> On 14 May 2012 21:30, Stefan Weil<sw@weilnetz.de> wrote:
>
>> 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 qemu-devel@nongnu.org --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.
>
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.
>> 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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 20:30 ` Stefan Weil
2012-05-14 20:53 ` Peter Maydell
@ 2012-05-14 21:06 ` Erik Rull
2012-05-14 21:11 ` Stefan Weil
1 sibling, 1 reply; 13+ messages in thread
From: Erik Rull @ 2012-05-14 21:06 UTC (permalink / raw)
To: Stefan Weil; +Cc: Erik Rull, qemu-devel@nongnu.org
Stefan Weil wrote:
> Am 14.05.2012 22:12, schrieb Erik Rull:
>> 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 qemu-devel@nongnu.org --to "n.n <address@domain>" 0001-*
>
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Posting a patch?
2012-05-14 21:06 ` Erik Rull
@ 2012-05-14 21:11 ` Stefan Weil
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Weil @ 2012-05-14 21:11 UTC (permalink / raw)
To: Erik Rull; +Cc: qemu-devel@nongnu.org
Am 14.05.2012 23:06, schrieb Erik Rull:
>
> 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
>
You must commit your local change before you can format a patch.
Regards,
Stefan W.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-05-15 10:18 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 20:12 [Qemu-devel] Posting a patch? Erik Rull
2012-05-14 20:30 ` Stefan Weil
2012-05-14 20:53 ` Peter Maydell
2012-05-14 20:58 ` Anthony Liguori
2012-05-14 21:04 ` Eric Blake
2012-05-14 21:10 ` Erik Rull
2012-05-14 21:20 ` Stefan Weil
2012-05-14 21:29 ` Erik Rull
2012-05-14 21:08 ` Stefan Weil
2012-05-14 21:14 ` Stefan Weil
2012-05-15 10:18 ` Peter Maydell
2012-05-14 21:06 ` Erik Rull
2012-05-14 21:11 ` Stefan Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).