summaryrefslogtreecommitdiffstats
path: root/githooks.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-04-25 14:41:32 -0700
committerJunio C Hamano <gitster@pobox.com>2023-04-25 14:41:32 -0700
commit9f24e83938a63da598f028aa55ca719785e735a1 (patch)
treebcfcb87e2b4758a29d715e9d279c77ad7508c240 /githooks.txt
parentc9fda06344238bafa8ee4cdd35fd3dabbda87c92 (diff)
downloadgit-htmldocs-9f24e83938a63da598f028aa55ca719785e735a1.tar.gz
Autogenerated HTML docs for v2.40.1-423-g2807b
Diffstat (limited to 'githooks.txt')
-rw-r--r--githooks.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/githooks.txt b/githooks.txt
index 62908602e..c8e55b261 100644
--- a/githooks.txt
+++ b/githooks.txt
@@ -600,6 +600,28 @@ the name of the file that holds the e-mail to be sent. Exiting with a
non-zero status causes `git send-email` to abort before sending any
e-mails.
+The following environment variables are set when executing the hook.
+
+`GIT_SENDEMAIL_FILE_COUNTER`::
+ A 1-based counter incremented by one for every file holding an e-mail
+ to be sent (excluding any FIFOs). This counter does not follow the
+ patch series counter scheme. It will always start at 1 and will end at
+ GIT_SENDEMAIL_FILE_TOTAL.
+
+`GIT_SENDEMAIL_FILE_TOTAL`::
+ The total number of files that will be sent (excluding any FIFOs). This
+ counter does not follow the patch series counter scheme. It will always
+ be equal to the number of files being sent, whether there is a cover
+ letter or not.
+
+These variables may for instance be used to validate patch series.
+
+The sample `sendemail-validate` hook that comes with Git checks that all sent
+patches (excluding the cover letter) can be applied on top of the upstream
+repository default branch without conflicts. Some placeholders are left for
+additional validation steps to be performed after all patches of a given series
+have been applied.
+
fsmonitor-watchman
~~~~~~~~~~~~~~~~~~