The driver for the ESP8266 WiFi module
Fork of esp8266-driver by
ESP8266/ATParser/.git/hooks/prepare-commit-msg.sample@0:6946b0b9e323, 2017-01-12 (annotated)
- Committer:
- group-ESP8266
- Date:
- Thu Jan 12 21:57:48 2017 +0000
- Revision:
- 0:6946b0b9e323
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
group-ESP8266 | 0:6946b0b9e323 | 1 | #!/bin/sh |
group-ESP8266 | 0:6946b0b9e323 | 2 | # |
group-ESP8266 | 0:6946b0b9e323 | 3 | # An example hook script to prepare the commit log message. |
group-ESP8266 | 0:6946b0b9e323 | 4 | # Called by "git commit" with the name of the file that has the |
group-ESP8266 | 0:6946b0b9e323 | 5 | # commit message, followed by the description of the commit |
group-ESP8266 | 0:6946b0b9e323 | 6 | # message's source. The hook's purpose is to edit the commit |
group-ESP8266 | 0:6946b0b9e323 | 7 | # message file. If the hook fails with a non-zero status, |
group-ESP8266 | 0:6946b0b9e323 | 8 | # the commit is aborted. |
group-ESP8266 | 0:6946b0b9e323 | 9 | # |
group-ESP8266 | 0:6946b0b9e323 | 10 | # To enable this hook, rename this file to "prepare-commit-msg". |
group-ESP8266 | 0:6946b0b9e323 | 11 | |
group-ESP8266 | 0:6946b0b9e323 | 12 | # This hook includes three examples. The first comments out the |
group-ESP8266 | 0:6946b0b9e323 | 13 | # "Conflicts:" part of a merge commit. |
group-ESP8266 | 0:6946b0b9e323 | 14 | # |
group-ESP8266 | 0:6946b0b9e323 | 15 | # The second includes the output of "git diff --name-status -r" |
group-ESP8266 | 0:6946b0b9e323 | 16 | # into the message, just before the "git status" output. It is |
group-ESP8266 | 0:6946b0b9e323 | 17 | # commented because it doesn't cope with --amend or with squashed |
group-ESP8266 | 0:6946b0b9e323 | 18 | # commits. |
group-ESP8266 | 0:6946b0b9e323 | 19 | # |
group-ESP8266 | 0:6946b0b9e323 | 20 | # The third example adds a Signed-off-by line to the message, that can |
group-ESP8266 | 0:6946b0b9e323 | 21 | # still be edited. This is rarely a good idea. |
group-ESP8266 | 0:6946b0b9e323 | 22 | |
group-ESP8266 | 0:6946b0b9e323 | 23 | case "$2,$3" in |
group-ESP8266 | 0:6946b0b9e323 | 24 | merge,) |
group-ESP8266 | 0:6946b0b9e323 | 25 | /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; |
group-ESP8266 | 0:6946b0b9e323 | 26 | |
group-ESP8266 | 0:6946b0b9e323 | 27 | # ,|template,) |
group-ESP8266 | 0:6946b0b9e323 | 28 | # /usr/bin/perl -i.bak -pe ' |
group-ESP8266 | 0:6946b0b9e323 | 29 | # print "\n" . `git diff --cached --name-status -r` |
group-ESP8266 | 0:6946b0b9e323 | 30 | # if /^#/ && $first++ == 0' "$1" ;; |
group-ESP8266 | 0:6946b0b9e323 | 31 | |
group-ESP8266 | 0:6946b0b9e323 | 32 | *) ;; |
group-ESP8266 | 0:6946b0b9e323 | 33 | esac |
group-ESP8266 | 0:6946b0b9e323 | 34 | |
group-ESP8266 | 0:6946b0b9e323 | 35 | # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
group-ESP8266 | 0:6946b0b9e323 | 36 | # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |