diff options
author | Robin Jarry <robin@jarry.cc> | 2022-12-21 15:01:53 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-12-21 15:05:09 +0100 |
commit | 9cb67abce7f4dbd5288c123d571fa65e5b1e73f8 (patch) | |
tree | 8a123c4bc65210e79e4ee6cda4ef99ad3608ed62 /contrib | |
parent | 466888da4776ec9e67d9765e2465e295e4d74060 (diff) | |
download | aerc-9cb67abce7f4dbd5288c123d571fa65e5b1e73f8.tar.gz |
sendemail-validate: ignore empty patches from cover letter
Avoid errors by checking cover letters as regular patches.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/sendemail-validate | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/sendemail-validate b/contrib/sendemail-validate index 4ced8107..024506fb 100755 --- a/contrib/sendemail-validate +++ b/contrib/sendemail-validate @@ -13,7 +13,11 @@ trap "rm -rf -- $tmp" EXIT git clone -q --depth=1 "https://git.sr.ht/~rjarry/aerc" "$tmp" || die "Failed to clone upstream repository. No network connection?" export GIT_DIR="$tmp/.git" -git -C "$tmp" am -q3 "$email" || +git -C "$tmp" am -q3 --empty=drop "$email" || die "Failed to apply patch on current upstream master branch. git pull --rebase?" +if ! git -C "$tmp" diff --quiet origin/master; then + # patch is empty (cover letter) + exit 0 +fi make -sC "$tmp" all lint tests check-patches || die "Please fix the above issues and amend your patch." |