[PATCH v2 2/6] docs/devel: add git-publish for patch submitting

Pierrick Bouvier posted 6 patches 5 months, 1 week ago
There is a newer version of this series
[PATCH v2 2/6] docs/devel: add git-publish for patch submitting
Posted by Pierrick Bouvier 5 months, 1 week ago
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 docs/devel/submitting-a-patch.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst
index 03b2ac298aa..f8b7fc59544 100644
--- a/docs/devel/submitting-a-patch.rst
+++ b/docs/devel/submitting-a-patch.rst
@@ -235,6 +235,25 @@ to another list.) ``git send-email`` (`step-by-step setup guide
 works best for delivering the patch without mangling it, but
 attachments can be used as a last resort on a first-time submission.
 
+.. _use_git_publish:
+
+Use git-publish
+~~~~~~~~~~~~~~~
+
+If you already configured git send-email, you can simply use `git-publish
+<https://github.com/stefanha/git-publish>`__ to send series.
+
+::
+
+    $ git checkout master -b my-feature
+    $ # work on new commits, add your 'Signed-off-by' lines to each
+    $ git publish
+    $ ... more work, rebase on master, ...
+    $ git publish # will send a v2
+
+Each time you post a series, git-publish will create a local tag with the format
+``<branchname>-v<version>`` to record the patch series.
+
 .. _if_you_cannot_send_patch_emails:
 
 If you cannot send patch emails
-- 
2.39.5
Re: [PATCH v2 2/6] docs/devel: add git-publish for patch submitting
Posted by Daniel P. Berrangé 5 months, 1 week ago
On Thu, Dec 05, 2024 at 02:22:37PM -0800, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>  docs/devel/submitting-a-patch.rst | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst
> index 03b2ac298aa..f8b7fc59544 100644
> --- a/docs/devel/submitting-a-patch.rst
> +++ b/docs/devel/submitting-a-patch.rst
> @@ -235,6 +235,25 @@ to another list.) ``git send-email`` (`step-by-step setup guide
>  works best for delivering the patch without mangling it, but
>  attachments can be used as a last resort on a first-time submission.
>  
> +.. _use_git_publish:
> +
> +Use git-publish
> +~~~~~~~~~~~~~~~
> +
> +If you already configured git send-email, you can simply use `git-publish
> +<https://github.com/stefanha/git-publish>`__ to send series.
> +
> +::
> +
> +    $ git checkout master -b my-feature
> +    $ # work on new commits, add your 'Signed-off-by' lines to each
> +    $ git publish
> +    $ ... more work, rebase on master, ...
> +    $ git publish # will send a v2
> +
> +Each time you post a series, git-publish will create a local tag with the format
> +``<branchname>-v<version>`` to record the patch series.

Lets also mention

  "When sending patch emails, 'git publish' will consult the output
   of 'scripts/get_maintainers.pl' and automatically CC anyone listed
   as maintainers of the affected code. Generally you should accept the
   suggested CC list, but there may sometimes be scenarios where it is
   appropriate to cut it down (eg on certain large tree-wide cleanups),
   or augment it with other interested people"

Second, lets say something about pull requests

  "When a subsystem maintainer is ready to send a pull request, the
   'git publish --pull' command will triggering GPG tag signing,
   publish the branch to the git remote name specified by the
   'remote.pushDefault' config option, and send the email series'

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Re: [PATCH v2 2/6] docs/devel: add git-publish for patch submitting
Posted by Peter Maydell 5 months, 1 week ago
On Fri, 6 Dec 2024 at 11:32, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Thu, Dec 05, 2024 at 02:22:37PM -0800, Pierrick Bouvier wrote:
> > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> > ---
> >  docs/devel/submitting-a-patch.rst | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >
> > diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst
> > index 03b2ac298aa..f8b7fc59544 100644
> > --- a/docs/devel/submitting-a-patch.rst
> > +++ b/docs/devel/submitting-a-patch.rst
> > @@ -235,6 +235,25 @@ to another list.) ``git send-email`` (`step-by-step setup guide
> >  works best for delivering the patch without mangling it, but
> >  attachments can be used as a last resort on a first-time submission.
> >
> > +.. _use_git_publish:
> > +
> > +Use git-publish
> > +~~~~~~~~~~~~~~~
> > +
> > +If you already configured git send-email, you can simply use `git-publish
> > +<https://github.com/stefanha/git-publish>`__ to send series.
> > +
> > +::
> > +
> > +    $ git checkout master -b my-feature
> > +    $ # work on new commits, add your 'Signed-off-by' lines to each
> > +    $ git publish
> > +    $ ... more work, rebase on master, ...
> > +    $ git publish # will send a v2
> > +
> > +Each time you post a series, git-publish will create a local tag with the format
> > +``<branchname>-v<version>`` to record the patch series.
>
> Lets also mention
>
>   "When sending patch emails, 'git publish' will consult the output
>    of 'scripts/get_maintainers.pl' and automatically CC anyone listed
>    as maintainers of the affected code. Generally you should accept the
>    suggested CC list, but there may sometimes be scenarios where it is
>    appropriate to cut it down (eg on certain large tree-wide cleanups),
>    or augment it with other interested people"
>
> Second, lets say something about pull requests
>
>   "When a subsystem maintainer is ready to send a pull request, the
>    'git publish --pull' command will triggering GPG tag signing,
>    publish the branch to the git remote name specified by the
>    'remote.pushDefault' config option, and send the email series'

We don't do pull requests for the normal "end developer submits
a patch" process, and given the prevalence of the github/gitlab
"all contributions go in as pull requests" model, I think that
talking about pull requests here (except to say "we don't do them")
would be confusing. If we want to document how you can use git publish
for pull request submission we can do that in
docs/devel/submitting-a-pull-request.rst.

thanks
-- PMM
Re: [PATCH v2 2/6] docs/devel: add git-publish for patch submitting
Posted by Pierrick Bouvier 5 months, 1 week ago
On 12/6/24 03:43, Peter Maydell wrote:
> On Fri, 6 Dec 2024 at 11:32, Daniel P. Berrangé <berrange@redhat.com> wrote:
>>
>> On Thu, Dec 05, 2024 at 02:22:37PM -0800, Pierrick Bouvier wrote:
>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>> ---
>>>   docs/devel/submitting-a-patch.rst | 19 +++++++++++++++++++
>>>   1 file changed, 19 insertions(+)
>>>
>>> diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst
>>> index 03b2ac298aa..f8b7fc59544 100644
>>> --- a/docs/devel/submitting-a-patch.rst
>>> +++ b/docs/devel/submitting-a-patch.rst
>>> @@ -235,6 +235,25 @@ to another list.) ``git send-email`` (`step-by-step setup guide
>>>   works best for delivering the patch without mangling it, but
>>>   attachments can be used as a last resort on a first-time submission.
>>>
>>> +.. _use_git_publish:
>>> +
>>> +Use git-publish
>>> +~~~~~~~~~~~~~~~
>>> +
>>> +If you already configured git send-email, you can simply use `git-publish
>>> +<https://github.com/stefanha/git-publish>`__ to send series.
>>> +
>>> +::
>>> +
>>> +    $ git checkout master -b my-feature
>>> +    $ # work on new commits, add your 'Signed-off-by' lines to each
>>> +    $ git publish
>>> +    $ ... more work, rebase on master, ...
>>> +    $ git publish # will send a v2
>>> +
>>> +Each time you post a series, git-publish will create a local tag with the format
>>> +``<branchname>-v<version>`` to record the patch series.
>>
>> Lets also mention
>>
>>    "When sending patch emails, 'git publish' will consult the output
>>     of 'scripts/get_maintainers.pl' and automatically CC anyone listed
>>     as maintainers of the affected code. Generally you should accept the
>>     suggested CC list, but there may sometimes be scenarios where it is
>>     appropriate to cut it down (eg on certain large tree-wide cleanups),
>>     or augment it with other interested people"
>>
>> Second, lets say something about pull requests
>>
>>    "When a subsystem maintainer is ready to send a pull request, the
>>     'git publish --pull' command will triggering GPG tag signing,
>>     publish the branch to the git remote name specified by the
>>     'remote.pushDefault' config option, and send the email series'
> 
> We don't do pull requests for the normal "end developer submits
> a patch" process, and given the prevalence of the github/gitlab
> "all contributions go in as pull requests" model, I think that
> talking about pull requests here (except to say "we don't do them")
> would be confusing. If we want to document how you can use git publish
> for pull request submission we can do that in
> docs/devel/submitting-a-pull-request.rst.
> 

This page recommends using an alternative script [1].

I'll let you or Daniel decide which one should be used (git-publish vs 
make-pullreq) and update accordingly the concerned page.

[1] 
https://git.linaro.org/people/peter.maydell/misc-scripts.git/tree/make-pullreq

> thanks
> -- PMM

Re: [PATCH v2 2/6] docs/devel: add git-publish for patch submitting
Posted by Daniel P. Berrangé 5 months, 1 week ago
On Fri, Dec 06, 2024 at 11:43:11AM +0000, Peter Maydell wrote:
> On Fri, 6 Dec 2024 at 11:32, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Thu, Dec 05, 2024 at 02:22:37PM -0800, Pierrick Bouvier wrote:
> > > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> > > ---
> > >  docs/devel/submitting-a-patch.rst | 19 +++++++++++++++++++
> > >  1 file changed, 19 insertions(+)
> > >
> > > diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst
> > > index 03b2ac298aa..f8b7fc59544 100644
> > > --- a/docs/devel/submitting-a-patch.rst
> > > +++ b/docs/devel/submitting-a-patch.rst
> > > @@ -235,6 +235,25 @@ to another list.) ``git send-email`` (`step-by-step setup guide
> > >  works best for delivering the patch without mangling it, but
> > >  attachments can be used as a last resort on a first-time submission.
> > >
> > > +.. _use_git_publish:
> > > +
> > > +Use git-publish
> > > +~~~~~~~~~~~~~~~
> > > +
> > > +If you already configured git send-email, you can simply use `git-publish
> > > +<https://github.com/stefanha/git-publish>`__ to send series.
> > > +
> > > +::
> > > +
> > > +    $ git checkout master -b my-feature
> > > +    $ # work on new commits, add your 'Signed-off-by' lines to each
> > > +    $ git publish
> > > +    $ ... more work, rebase on master, ...
> > > +    $ git publish # will send a v2
> > > +
> > > +Each time you post a series, git-publish will create a local tag with the format
> > > +``<branchname>-v<version>`` to record the patch series.
> >
> > Lets also mention
> >
> >   "When sending patch emails, 'git publish' will consult the output
> >    of 'scripts/get_maintainers.pl' and automatically CC anyone listed
> >    as maintainers of the affected code. Generally you should accept the
> >    suggested CC list, but there may sometimes be scenarios where it is
> >    appropriate to cut it down (eg on certain large tree-wide cleanups),
> >    or augment it with other interested people"
> >
> > Second, lets say something about pull requests
> >
> >   "When a subsystem maintainer is ready to send a pull request, the
> >    'git publish --pull' command will triggering GPG tag signing,
> >    publish the branch to the git remote name specified by the
> >    'remote.pushDefault' config option, and send the email series'
> 
> We don't do pull requests for the normal "end developer submits
> a patch" process, and given the prevalence of the github/gitlab
> "all contributions go in as pull requests" model, I think that
> talking about pull requests here (except to say "we don't do them")
> would be confusing. If we want to document how you can use git publish
> for pull request submission we can do that in
> docs/devel/submitting-a-pull-request.rst.

Ah yes, I agree with that.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|