On Mon, 7 Aug 2023 20:30:53 +0300
Joonas Kylmälä <joonas.kylm...@iki.fi> wrote:

> Hi Denis,
Hi,

> seems like somehow the prefix "replicant_prepare_patch.py:" is still
> in the v2 patches (though, in the first one it should be). I wonder
> how it gets added, does git send-email or similar command do it
> somehow?
I added it manually. Basically vendor_replicant-scripts has many
different scripts, so I added it in the commit message.

For instance if I do git log --oneline --no-decorate I have:
> bfb23c9 replicant_prepare_patch.py: Makefile: Ship COPYING, README,
>         config file
> 040ad88 replicant_prepare_patch.py: Makefile: remove useless -m 755
>         option
> 1aebde5 replicant_prepare_patch.py: README: fix example repository URL
> 88b0cbd replicant_prepare_patch.py: Makefile: fix DESTDIR
> e77bc0e replicant_prepare_patch.py: Makefile: create DESTDIR
> 4ba52a1 replicant_prepare_patch.py: fix interpreter path

The 'replicant_prepare_patch.py: V2 for "Build system and documentation
fixes"' mail is the cover letter, it's generated by the '--compose'
argument of the git command printed by replicant_prepare_patch.py.

More precisely using replicant_prepare_patch.py looks like that (I've
adjusted the output a bit for the 70 characters limit of the mails):
> $ replicant_prepare_patch.py replicant/main
> patches:
> --------
> 0001-replicant_prepare_patch.py-fix-interpreter-path.patch
> 0002-replicant_prepare_patch.py-Makefile-create-DESTDIR.patch
> 0003-replicant_prepare_patch.py-Makefile-fix-DESTDIR.patch
> 0004-replicant_prepare_patch.py-README-fix-example-reposi.patch
> 0005-replicant_prepare_patch.py-Makefile-remove-useless-m.patch
> 0006-replicant_prepare_patch.py-Makefile-Ship-COPYING-REA.patch
> 
> git command:
> ------------
> git send-email --compose --to=replicant@osuosl.org \
> 0001-replicant_prepare_patch.py-fix-interpreter-path.patch \
> 0002-replicant_prepare_patch.py-Makefile-create-DESTDIR.patch \
> 0003-replicant_prepare_patch.py-Makefile-fix-DESTDIR.patch \
> 0004-replicant_prepare_patch.py-README-fix-example-reposi.patch \
> 0005-replicant_prepare_patch.py-Makefile-remove-useless-m.patch \
> 0006-replicant_prepare_patch.py-Makefile-Ship-COPYING-REA.patch
> 
> Cover mail:
> -----------
> Hi,
> 
> In addition to the patches that will follow in a response to
> this mail, here's an URL to the see the patches in a web interface:
> https://git.replicant.us/contrib/GNUtoo/vendor_replicant-scripts/commit/?id=bfb23c91109014a192bdf697bf2a01139ef5c07f
> 
> And here's how to get them in a git repository:
> git clone https://git.replicant.us/GNUtoo/vendor_replicant-scripts
> cd vendor_replicant-scripts
> git show bfb23c91109014a192bdf697bf2a01139ef5c07f
> 
> Denis.

Here this script generates the patches with the proper subject prefix
(here "[vendor_replicant-scripts]") and just prints the text above. It
doesn't send any mail automatically. 

Since the script also accepts arguments understood by git format-patch
it saves me a lot of time as I don't have to do all that manually with
trials and errors anymore, and if I want to produce some V2 version, I
just pass it -v2, so it's also flexible enough not to have to revert to
100% manual workflows for some corner cases.

And people wanting to use web interfaces to review the patches can also
do that (initially the script was made for that use case as long time
ago someone complained on this mailing list about not being able to do
that).

Before running the script I need to:
- Have a valid configuration file. The configuration file can be used
  to change my name, signature, the mailing list to send the patch to,
  and "GNUtoo" in https://git.replicant.us/contrib/GNUtoo/[...].
- Push my code in
  https://git.replicant.us/GNUtoo/vendor_replicant-scripts. Any branch
  works as it uses the hash commit.

I then Copy what's in "Cover mail" with shift+control+c, then run
the git command it printed and then I end up with something like that:
> From Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org> # This line
> # is ignored.
> GIT: Lines beginning in "GIT:" will be removed.
> GIT: Consider including an overall diffstat or table of contents
> GIT: for the patch you are writing.
> GIT:
> GIT: Clear the body content if you don't wish to send a summary.
> From: Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org>
> Reply-To:
> Subject:
> In-Reply-To:
> 
> GIT: [vendor_replicant-scripts] [PATCH 1/6]
> replicant_prepare_patch.py:
> GIT: [vendor_replicant-scripts] [PATCH 2/6]
> replicant_prepare_patch.py:
> GIT: [vendor_replicant-scripts] [PATCH 3/6]
> replicant_prepare_patch.py:
> GIT: [vendor_replicant-scripts] [PATCH 4/6]
> replicant_prepare_patch.py:
> GIT: [vendor_replicant-scripts] [PATCH 5/6]
> replicant_prepare_patch.py:
> GIT: [vendor_replicant-scripts] [PATCH 6/6]
> replicant_prepare_patch.py:

This is the cover mail. It's supposed to describe the patch serie.

So there I manually paste the text I copied before and I adjust it, I
also manually write the Subject.

So as you rightly pointed out before I forgot to add
'replicant_prepare_patch.py' in the Subject of the cover email.

This is because usually my patches series are not about a single script
(they often contain patches for multiples unrelated fixes, or span
across multiple repositories) and so I didn't have the good idea to copy
"replicant_prepare_patch.py" in the Subject of the cover mail as well.

As for which subject to pick, I very often fail to find very meaningful
names, so they usually have some generic names like "<something> fixes"
in the lack of a better idea.

Denis.

Attachment: pgpfi69XqMaJW.pgp
Description: OpenPGP digital signature

_______________________________________________
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to