diff options
author | 2011-03-01 20:20:29 -0500 | |
---|---|---|
committer | 2011-03-01 20:59:04 -0500 | |
commit | b90e01392c1b88f5403d39e044cf80353923ca54 (patch) | |
tree | e25a2bbccb5350342a005e5d76cb9ec1676b544a /git-tools | |
parent | [ticket/9824] Handle empty commit messages in commit-msg hook. (diff) | |
download | phpbb-b90e01392c1b88f5403d39e044cf80353923ca54.tar.gz phpbb-b90e01392c1b88f5403d39e044cf80353923ca54.tar.bz2 phpbb-b90e01392c1b88f5403d39e044cf80353923ca54.zip |
[ticket/9824] Use printf instead of echo to render \n.
On FreeBSD `echo "\n"` prints \n verbatim. Use printf instead.
PHPBB3-9824
Diffstat (limited to 'git-tools')
-rwxr-xr-x | git-tools/hooks/prepare-commit-msg | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-tools/hooks/prepare-commit-msg b/git-tools/hooks/prepare-commit-msg index c3e5dfa90c..11d2b6b2f2 100755 --- a/git-tools/hooks/prepare-commit-msg +++ b/git-tools/hooks/prepare-commit-msg @@ -35,7 +35,7 @@ then # Branch is prefixed with 'ticket/', append ticket ID to message if [ "$branch" != "${branch##ticket/}" ]; then - tail="\n\nPHPBB3-${branch##ticket/}"; + tail="$(printf "\n\nPHPBB3-${branch##ticket/}")"; fi echo "[$branch] $tail$(cat "$1")" > "$1" |