| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
On macOS the -t option must immediately precede the prefix template or
else the generated temp name includes a newline (!), which causes the
rest of the sendemail-validate script to fail.
Signed-off-by: Gregory Anders <greg@gpanders.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One weakness of the email based workflow as used on Sourcehut is that
git send-email strips all signatures from commits. patatt is not strict
equivalent of signed commits, but at least there is a cryptographic
attestation that the patch was send by the person it pretends it was
sent.
Optional, default off, switched on by setting
$ git config --bool sendemail.runPatatt true
Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before version 2.41, the sendemail-validate script can only be used to
validate patches one by one, even when sending patch series.
Set both GIT_SENDEMAIL_FILE_{COUNTER,TOTAL} to 1 in case they are not
defined to avoid obscure errors. At least with older git versions,
single patch validation should be possible.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
| |
Instead of hiding the actual checks deep into the CI framework and into
the sendemail-validate hook, add a validate make target that uses proper
variables and runs the required checks. Use it in the sendemail-validate
hook and the CI builds.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
Some OSes (e.g., Arch Linux) ship GNU Make but only provide the `make`
executable.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove GNU specific stuff (ln -v, mktemp --tempdir, grep --color)
- Remove GCC specific flags in sendemail-validate (-Warith-conversion)
- Add -std=c99 and -Wpedantic and fix the reported warnings.
- Explicitly call gmake everywhere.
- Run our custom analyzer standalone. Golangci lint plugins are not
supported on OpenBSD. Indirect dependency to golang.org/x/mod is
required somehow...
Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid failure when the styleset [viewer] section contains spaces:
~$ cat foo
[viewer]
url.fg = #ffffaf
url.underline = true
header.fg = #af87ff
signature.fg = #af87ff
diff_meta.fg = #ffffff
diff_meta.bold = true
diff_chunk.fg = #00cdcd
diff_add.fg = #00cd00
diff_del.fg = #cd0000
quote_1.fg = #5fafff
quote_2.fg = #ff8700
quote_3.fg = #af87ff
quote_4.fg = #ff5fd7
quote_x.fg = #808080
~$ ./colorize -s foo < bar.eml
error: invalid style attribute 'fg '
Be more restrictive with what characters are part of a style attribute.
Add test styleset with as much weirdness as possible. Update vectors
accordingly. Update sendemail-validate hook to export pedantic CFLAGS.
Reported-by: Tristan Partin <tristan@partin.io>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tristan Partin <tristan@partin.io>
Tested-by: Tristan Partin <tristan@partin.io>
|
|
|
|
|
|
|
|
|
| |
With git 2.41, git send-email exports a patch counter to the validate
hook. Copy the example hook from git and adapt it for aerc.
Link: https://github.com/git/git/commit/3c8d3adeae83
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current sendemail-validate script cannot be used for patch series.
It works on each patch independently from the others and make it
impossible to use when there are inter dependencies.
I have submitted an alternate validate script that works on whole series
which is still waiting for reviews. In the meantime, propose to use my
script which can work. To install it in your environment:
curl -Lo ~/.local/bin/git-send-email \
https://paste.sr.ht/blob/cedcf24383022949c8dc5bc1300cf5cbc879b36f
echo 'export GIT_EXEC_PATH=$PATH:$(git --exec-path)' >> ~/.profile
Link: https://lore.kernel.org/git/20230103231133.64050-1-robin@jarry.cc/
Link: https://paste.sr.ht/~rjarry/7e9a98866ba2c6f34e4169debf4f2c14b574613e
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Seen with git 2.34:
error: unknown option `empty=drop'
Check the patch file manually instead and abort early.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
Avoid errors by checking cover letters as regular patches.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
This is less important than reporting actual coding errors.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the patch fails to apply, users may get an obscure error from git:
error: sha1 information is lacking or useless (commands/msg/reply.go).
error: could not build fake ancestor
Add explicit error messages indicating what happened and what should be
done.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
Add a gitconfig target in the Makefile to configure a new clone with
sane defaults:
- set subject prefix
- set correct mailing list address
- enable sendemail.validate
- install sendemail-validate hook
The sendemail-validate hook will make a shallow clone of the current
upstream repo, apply every patch on it and run some checks (a stripped
down version of what is run by the upstream CI).
Add a new check-patches script that verifies that the commit message
actually contains something and that the Signed-off-by trailer from the
patch author is present.
Call check-patches in both the CI and the sendemail-validate hook.
Update CONTRIBUTING.md accordingly.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|