# For example:
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
+export LC_ALL=en_US.UTF-8
+
class=`git config zephyr.class`
instance=`git config zephyr.instance`
zsig=`git config zephyr.zsig`
color=`git config --bool zephyr.color`
+maxlines=`git config --int zephyr.maxlines 2>/dev/null || echo 50`
if [ "${color:-true}" = "true" ]; then
usecolor="--color"
while read rev; do
check_max
shortrev=`git log -1 --pretty=format:%h "$rev"`
- (git show --stat -M $usecolor "$rev" |
+ lines=`git show -M "$rev" | wc -l`
+ if [ $lines -lt $maxlines ]; then
+ stat=""
+ else
+ stat="--stat"
+ fi
+ (git show -M $stat $usecolor "$rev" |
sed -e 's/@/@@/g' \
-e 's/}/@(})/g' \
-e 's/\e\[m/}@{/g' \
+ -e 's/\e\[1m/}@b{/g' \
-e 's/\e\[33m/@color(yellow)/g' \
-e 's/\e\[31m/@color(red)/g' \
-e 's/\e\[32m/@color(green)/g' \
+ -e 's/\e\[36m/@color(cyan)/g' \
+ -e 's/\e\[41m/}@i{@color(red)/g' \
-e '1s/^/@{/' \
-e '$s/$/}/') |
zwrite -c "$class" -i "${instance:-$shortrev}" -s "$zsig: $refname" -d