The driver for the ESP8266 WiFi module
Fork of esp8266-driver by
ESP8266/ATParser/.git/hooks/pre-commit.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 verify what is about to be committed. |
group-ESP8266 | 0:6946b0b9e323 | 4 | # Called by "git commit" with no arguments. The hook should |
group-ESP8266 | 0:6946b0b9e323 | 5 | # exit with non-zero status after issuing an appropriate message if |
group-ESP8266 | 0:6946b0b9e323 | 6 | # it wants to stop the commit. |
group-ESP8266 | 0:6946b0b9e323 | 7 | # |
group-ESP8266 | 0:6946b0b9e323 | 8 | # To enable this hook, rename this file to "pre-commit". |
group-ESP8266 | 0:6946b0b9e323 | 9 | |
group-ESP8266 | 0:6946b0b9e323 | 10 | if git rev-parse --verify HEAD >/dev/null 2>&1 |
group-ESP8266 | 0:6946b0b9e323 | 11 | then |
group-ESP8266 | 0:6946b0b9e323 | 12 | against=HEAD |
group-ESP8266 | 0:6946b0b9e323 | 13 | else |
group-ESP8266 | 0:6946b0b9e323 | 14 | # Initial commit: diff against an empty tree object |
group-ESP8266 | 0:6946b0b9e323 | 15 | against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
group-ESP8266 | 0:6946b0b9e323 | 16 | fi |
group-ESP8266 | 0:6946b0b9e323 | 17 | |
group-ESP8266 | 0:6946b0b9e323 | 18 | # If you want to allow non-ascii filenames set this variable to true. |
group-ESP8266 | 0:6946b0b9e323 | 19 | allownonascii=$(git config hooks.allownonascii) |
group-ESP8266 | 0:6946b0b9e323 | 20 | |
group-ESP8266 | 0:6946b0b9e323 | 21 | # Redirect output to stderr. |
group-ESP8266 | 0:6946b0b9e323 | 22 | exec 1>&2 |
group-ESP8266 | 0:6946b0b9e323 | 23 | |
group-ESP8266 | 0:6946b0b9e323 | 24 | # Cross platform projects tend to avoid non-ascii filenames; prevent |
group-ESP8266 | 0:6946b0b9e323 | 25 | # them from being added to the repository. We exploit the fact that the |
group-ESP8266 | 0:6946b0b9e323 | 26 | # printable range starts at the space character and ends with tilde. |
group-ESP8266 | 0:6946b0b9e323 | 27 | if [ "$allownonascii" != "true" ] && |
group-ESP8266 | 0:6946b0b9e323 | 28 | # Note that the use of brackets around a tr range is ok here, (it's |
group-ESP8266 | 0:6946b0b9e323 | 29 | # even required, for portability to Solaris 10's /usr/bin/tr), since |
group-ESP8266 | 0:6946b0b9e323 | 30 | # the square bracket bytes happen to fall in the designated range. |
group-ESP8266 | 0:6946b0b9e323 | 31 | test $(git diff --cached --name-only --diff-filter=A -z $against | |
group-ESP8266 | 0:6946b0b9e323 | 32 | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 |
group-ESP8266 | 0:6946b0b9e323 | 33 | then |
group-ESP8266 | 0:6946b0b9e323 | 34 | echo "Error: Attempt to add a non-ascii file name." |
group-ESP8266 | 0:6946b0b9e323 | 35 | echo |
group-ESP8266 | 0:6946b0b9e323 | 36 | echo "This can cause problems if you want to work" |
group-ESP8266 | 0:6946b0b9e323 | 37 | echo "with people on other platforms." |
group-ESP8266 | 0:6946b0b9e323 | 38 | echo |
group-ESP8266 | 0:6946b0b9e323 | 39 | echo "To be portable it is advisable to rename the file ..." |
group-ESP8266 | 0:6946b0b9e323 | 40 | echo |
group-ESP8266 | 0:6946b0b9e323 | 41 | echo "If you know what you are doing you can disable this" |
group-ESP8266 | 0:6946b0b9e323 | 42 | echo "check using:" |
group-ESP8266 | 0:6946b0b9e323 | 43 | echo |
group-ESP8266 | 0:6946b0b9e323 | 44 | echo " git config hooks.allownonascii true" |
group-ESP8266 | 0:6946b0b9e323 | 45 | echo |
group-ESP8266 | 0:6946b0b9e323 | 46 | exit 1 |
group-ESP8266 | 0:6946b0b9e323 | 47 | fi |
group-ESP8266 | 0:6946b0b9e323 | 48 | |
group-ESP8266 | 0:6946b0b9e323 | 49 | # If there are whitespace errors, print the offending file names and fail. |
group-ESP8266 | 0:6946b0b9e323 | 50 | exec git diff-index --check --cached $against -- |