From b35173545761fab41d019d49d3ca2954fc42296a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 26 Mar 2010 15:59:59 -0400 Subject: Perform bashectomy. --- repo/hooks/ciabot.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'repo') diff --git a/repo/hooks/ciabot.sh b/repo/hooks/ciabot.sh index 6c8799fd..70c7ec26 100755 --- a/repo/hooks/ciabot.sh +++ b/repo/hooks/ciabot.sh @@ -4,7 +4,6 @@ # Copyright (c) 2008 Natanael Copa # Copyright (c) 2010 Eric S. Raymond # -# Git CIA bot in bash. (no, not the POSIX shell, bash). # Originally based on Git ciabot.pl by Petr Baudis. # This script contains porcelain and porcelain byproducts. # @@ -25,9 +24,8 @@ # # -# The project as known to CIA. You will want to change this. +# The project as known to CIA. You will want to change this: # - project="GPSD" # @@ -91,9 +89,11 @@ gitver=$(git --version) gitver=${gitver##* } rev=$(git describe ${merged} 2>/dev/null) -# ${merged:0:12} is the only bashism left in this script, -# according to checkbashisms. -[ -z ${rev} ] && rev=${merged:0:12} +# ${merged:0:12} here was the only bashism left in the 2008 version of +# this script, according to checkbashisms. Replace it with ${merged} +# because it was just a fallback anyway, and it's worth taking accepting +# a longer fallback for faster execution and removing the bash deoendency. +[ -z ${rev} ] && rev=${merged} rawcommit=$(git cat-file commit ${merged}) author=$(echo "$rawcommit" | sed -n -e '/^author .*<\([^@]*\).*$/s--\1-p') -- cgit v1.2.1