diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-01-09 14:16:23 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-01-09 15:39:04 +0000 |
commit | ffcd1b2804bf32be0aa96c108f9b3b2bfebdfa99 (patch) | |
tree | 5600e458b95250edfdf95bbf6e33891a9d11004b /LICENSES/MIT.txt | |
parent | d8a17149cbb99b850156fb0cd705fb25eb752167 (diff) |
hooks: pre-push: Disable interpretation of escape sequences
The pre-push hook validates the commit messages utilising 'echo' to send
the captured data from the git commit through grep.
Commit messages may occasionally contain strings that could appear to be
escape sequences such as doxygen style references to \struct.
The '\' 'c' escape sequence can be interpreted to supress all further
output [0] which then breaks the processing and string matching.
Unfortunatley for us, doxygen's class reference constructed in the same
form as \struct can be interpreted as the escape sequence to supress
further output.
[0] https://www.gnu.org/software/bash/manual/bash.html#Bash-Builtins
Update the pre-push hook to explicitly disable escape sequence
interpretation using the '-E' flag. This is not available on the
posix-compliant shell 'dash', so also switch to bash explicitly to
prevent potential failures.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'LICENSES/MIT.txt')
0 files changed, 0 insertions, 0 deletions