From 491b3fac36137d33456dfcaa6684f1ef5376009f Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Fri, 28 Aug 2009 07:16:40 +0530 Subject: [PATCH] you can't array-deref an undefined value! --- src/update-hook.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/update-hook.pl b/src/update-hook.pl index 709266e..470cf8f 100755 --- a/src/update-hook.pl +++ b/src/update-hook.pl @@ -68,8 +68,8 @@ $perm = '+' if $ref =~ m(refs/tags/) and $oldsha ne ('0' x 40); $perm = '+' if $ref =~ m(refs/heads/) and $oldsha ne $merge_base; my @allowed_refs; -push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$perm}{$ENV{GL_USER}} }; -push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$perm}{'@all'} }; +push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$perm}{$ENV{GL_USER}} || [] }; +push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$perm}{'@all'} || [] }; for my $refex (@allowed_refs) # refex? sure -- a regex to match a ref against :) {