[Mesa-dev] [PATCH] docs/submitting patches: add git tips

Emil Velikov emil.l.velikov at gmail.com
Mon Nov 21 17:43:06 UTC 2016


On 21 November 2016 at 17:21, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 21.11.2016 17:37, Emil Velikov wrote:
>>
>> From: Timothy Arceri <t_arceri at yahoo.com.au>
>>
>> v2: [Emil Velikov]
>>  - Add the shorthand git send-email -vX
>>  - Move to submittingpatches.html
>>  - Add to the TOC.
>>
>> Cc: Timothy Arceri <t_arceri at yahoo.com.au>
>> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
>> Reviewed-by: Brian Paul <brianp at vmware.com> (v1)
>> ---
>> Tim any objections on merging this ? IMHO these are quite useful.
>> ---
>>  docs/submittingpatches.html | 20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>>
>> diff --git a/docs/submittingpatches.html b/docs/submittingpatches.html
>> index d3e86f5..7ada508 100644
>> --- a/docs/submittingpatches.html
>> +++ b/docs/submittingpatches.html
>> @@ -25,6 +25,7 @@
>>  <li><a href="#reviewing">Reviewing Patches</a>
>>  <li><a href="#nominations">Nominating a commit for a stable branch</a>
>>  <li><a href="#criteria">Criteria for accepting patches to the stable
>> branch</a>
>> +<li><a href="#gittips">Git tips</a>
>>  </ul>
>>
>>  <h2 id="guidelines">Basic guidelines</h2>
>> @@ -317,6 +318,25 @@ be rejected:
>>    regression that is unaacceptable for the stable branch.</li>
>>  </ul>
>>
>> +<h2 id="gittips">Git tips</h2>
>> +
>> +<ul>
>> +<li>Test for build breakage between patches e.g last 8 commits.
>> +<pre>
>> +    git rebase -i --exec="make -j4" HEAD~8
>> +</pre>
>> +<li>Sets the default mailing address for your repo.
>> +<pre>
>> +    git config --local sendemail.to mesa-dev at lists.freedesktop.org
>> +</pre>
>> +<li> Add version to subject line of patch series in this case for the
>> last 8
>> +commits before sending.
>> +<pre>
>> +    git send-email --subject-prefix="PATCH v4" HEAD~8
>> +    git send-email -v4 HEAD~8 # shorter version, 'inherited' from git
>> format-patch
>
>
> While at it, why not @~8? I was quite happy when I learned that through pure
> dumb luck recently...
>
Nice, did not know about it. Fwiw the following (even shorter version)
also works but I've avoided going "crazy" ;-)
$git send-email -v4 -8

My suggestion has some downsides (cannot append --annotate) so barring
any objections I'll sneak yours in before pushing ;-)

Thanks
Emil


More information about the mesa-dev mailing list