From f20df36745976186ebfa0c758539f6a9668614cf Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Thu, 14 Aug 2008 11:17:44 -0500 Subject: [PATCH] Don't use fancy regex stuff that isn't in bash 3.0. --- server/update-git-config | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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#*=}" -- 2.39.5