[libvirt] [libvirt-php 1/3] build: add error message

Michal Novotny minovotn at redhat.com
Fri Feb 25 16:25:00 UTC 2011


On 02/25/2011 05:15 PM, 李勇 wrote:
> 于 2011/2/25 22:42, Michal Novotny 写道:
>> On 02/25/2011 02:48 PM, Lyre wrote:
>>> oops! Just one patch, the other two are commit and revert.
>>>
>>> -- 
>>> libvir-list mailing list
>>> libvir-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/libvir-list
>> Please repost the whole patch series once you fix it.
>>
>> Michal
>>
> Hi michal:
>
> Just this patch, I don't know how to format-patch for a specified commit.

It's simple. You have to commit the patches to your repository and then 
you run `git format-patch -X -n` where -X is the number of patches to be 
formatted. Optional is `-n` argument is good when you do multipart patch 
(i.e. in more commits) since the subject ends up in "PATCH 0/2" instead 
of just "PATCH" for case you are formatting it for 2 last commits. It's 
very useful. Also, if you would like to have an e-mail describing 
functionality and similar you can include cover letter using 
`--cover-letter` argument passed to the git format-patch command.

Example:

If you would like to send 3 last local commits in the patches and 
include some information to them you would run `git format-patch -3 -n 
--cover-letter'. It will create:

0000-cover-letter.patch
0001-commit-message-header-1.patch
0002-commit-message-header-2.patch
0003-commit-message-header-3.patch

Those files are separate commits which will result into separate 
e-mails. You should open 0000-cover-letter.patch using your favorite 
text file editor and include subject and message instead of **SUBJECT** 
and **BLURB** lines. When you're done with that you can send them using 
`git send-email 00* --to e-mail-address at domain.tld`.

>
> I've made 3 commits in git:
>
> 1.this one,
> 2.another commit
> 3.revert commit2, so is equal to commit1,is that right?
>

Yes, this way it's fine since it is commit 1 only but since it's not in 
the upstream repo yet you could reset it using the `git reset --hard 
HEAD^` after step 2 to revert the commit (commit 2) and send just the 
one patch to the list.

Hope this helps,
Michal


-- 
Michal Novotny<minovotn at redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat




More information about the libvir-list mailing list