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