From 0a6422ec6a30429215c4a93dd5a40799712c09b0 Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Sat, 2 Feb 2013 18:59:17 -0500 Subject: [PATCH] zephyr-post-receive: fix quoting and tabs --- git-hooks/zephyr-post-receive | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/git-hooks/zephyr-post-receive b/git-hooks/zephyr-post-receive index d0c6f44..6feebad 100755 --- a/git-hooks/zephyr-post-receive +++ b/git-hooks/zephyr-post-receive @@ -61,15 +61,16 @@ while read oldrev newrev refname; do check_max shortrev=`git log -1 --pretty=format:%h "$rev"` lines=`git show -M "$rev" | wc -l` - cmd="git show --stat -M $usecolor $rev" if [ $lines -lt $maxlines ]; then - cmd="git show -M $usecolor $rev" + stat="" + else + stat="--stat" fi - ($cmd | + (git show -M $stat $usecolor "$rev" | sed -e 's/@/@@/g' \ -e 's/}/@(})/g' \ -e 's/\[m/}@{/g' \ - -e 's/\[1m/}@b{/g' \ + -e 's/\[1m/}@b{/g' \ -e 's/\[33m/@color(yellow)/g' \ -e 's/\[31m/@color(red)/g' \ -e 's/\[32m/@color(green)/g' \ -- 2.44.0