Diltech RM Consultant
/
DISPLAY-OLED
Test pour écran OLED 128 x 64 SSD1306 avec sonde thermique DS18B20
.git/hooks/commit-msg.sample@0:8ae2868c8c6c, 2022-05-28 (annotated)
- Committer:
- diltech
- Date:
- Sat May 28 13:22:32 2022 +0000
- Revision:
- 0:8ae2868c8c6c
Projet initial
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
diltech | 0:8ae2868c8c6c | 1 | #!/bin/sh |
diltech | 0:8ae2868c8c6c | 2 | # |
diltech | 0:8ae2868c8c6c | 3 | # An example hook script to check the commit log message. |
diltech | 0:8ae2868c8c6c | 4 | # Called by "git commit" with one argument, the name of the file |
diltech | 0:8ae2868c8c6c | 5 | # that has the commit message. The hook should exit with non-zero |
diltech | 0:8ae2868c8c6c | 6 | # status after issuing an appropriate message if it wants to stop the |
diltech | 0:8ae2868c8c6c | 7 | # commit. The hook is allowed to edit the commit message file. |
diltech | 0:8ae2868c8c6c | 8 | # |
diltech | 0:8ae2868c8c6c | 9 | # To enable this hook, rename this file to "commit-msg". |
diltech | 0:8ae2868c8c6c | 10 | |
diltech | 0:8ae2868c8c6c | 11 | # Uncomment the below to add a Signed-off-by line to the message. |
diltech | 0:8ae2868c8c6c | 12 | # Doing this in a hook is a bad idea in general, but the prepare-commit-msg |
diltech | 0:8ae2868c8c6c | 13 | # hook is more suited to it. |
diltech | 0:8ae2868c8c6c | 14 | # |
diltech | 0:8ae2868c8c6c | 15 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
diltech | 0:8ae2868c8c6c | 16 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
diltech | 0:8ae2868c8c6c | 17 | |
diltech | 0:8ae2868c8c6c | 18 | # This example catches duplicate Signed-off-by lines. |
diltech | 0:8ae2868c8c6c | 19 | |
diltech | 0:8ae2868c8c6c | 20 | test "" = "$(grep '^Signed-off-by: ' "$1" | |
diltech | 0:8ae2868c8c6c | 21 | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { |
diltech | 0:8ae2868c8c6c | 22 | echo >&2 Duplicate Signed-off-by lines. |
diltech | 0:8ae2868c8c6c | 23 | exit 1 |
diltech | 0:8ae2868c8c6c | 24 | } |