diff options
author | Robin Jarry <robin@jarry.cc> | 2023-07-16 16:06:09 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-08-04 23:36:37 +0200 |
commit | 046b6e34ee6b53e274f03b59c895df40494eb923 (patch) | |
tree | 2b202c7611d235fecf1b0b12b9946eb8de41050a /Makefile | |
parent | dee1adce3f6ac9ba889fca89561231408e251aaa (diff) | |
download | aerc-046b6e34ee6b53e274f03b59c895df40494eb923.tar.gz |
contrib: update sendemail-validate hook
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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -206,10 +206,12 @@ uninstall: gitconfig: git config format.subjectPrefix "PATCH aerc" git config sendemail.to "~rjarry/aerc-devel@lists.sr.ht" - git config sendemail.validate true @mkdir -p .git/hooks - @rm -f .git/hooks/sendemail-validate - ln -sf ../../contrib/sendemail-validate .git/hooks/sendemail-validate-series + @rm -f .git/hooks/sendemail-validate* + @if grep -q GIT_SENDEMAIL_FILE_COUNTER `git --exec-path`/git-send-email 2>/dev/null; then \ + ln -svf ../../contrib/sendemail-validate .git/hooks/sendemail-validate && \ + git config sendemail.validate true; \ + fi .PHONY: check-patches check-patches: |