]> git.droids-corp.org - git-central.git/commitdiff
Don't use fancy regex stuff that isn't in bash 3.0.
authorStephen Haberman <stephen@exigencecorp.com>
Thu, 14 Aug 2008 16:17:44 +0000 (11:17 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Thu, 14 Aug 2008 16:17:44 +0000 (11:17 -0500)
server/update-git-config

index a5fd2e7c19d76fd26e1da2fde767c719d2f0e8ad..30b814b02fe306cd43ce9d97b72ab67998c7a0f7 100644 (file)
@@ -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#*=}"