From: Stephen Haberman Date: Thu, 14 Aug 2008 16:17:44 +0000 (-0500) Subject: Don't use fancy regex stuff that isn't in bash 3.0. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f20df36745976186ebfa0c758539f6a9668614cf;p=git-central.git Don't use fancy regex stuff that isn't in bash 3.0. --- diff --git a/server/update-git-config b/server/update-git-config index a5fd2e7..30b814b 100644 --- a/server/update-git-config +++ b/server/update-git-config @@ -8,10 +8,8 @@ if [ "$refname" != "refs/heads/gitconfig" ] ; then exit 0 fi -tree_contents=$(git ls-tree $newrev) -if [[ "$tree_contents" =~ (.{40})[[:space:]]config ]] ; then - config_hash=${BASH_REMATCH[1]} - echo "hash=$config_hash" +config_hash=$(git ls-tree $newrev | grep config | gawk '{print $3}') +if [[ "$config_hash" != "" ]] ; then git cat-file blob "$config_hash" | while read line ; do key="${line%=*}" value="${line#*=}"