summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-06-17 08:31:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-07 06:13:34 (GMT)
commit1e76b702c1e754c7e6df1ced9ce6f1863cb7e092 (patch)
treecc2e3a07804ab8f89cfc13b0b322bf9cd30c4a54 /git-cvsserver.perl
parent3cd2491aa2e5f07fa7fbeaa529b77de8c005a01c (diff)
downloadgit-1e76b702c1e754c7e6df1ced9ce6f1863cb7e092.zip
git-1e76b702c1e754c7e6df1ced9ce6f1863cb7e092.tar.gz
git-1e76b702c1e754c7e6df1ced9ce6f1863cb7e092.tar.bz2
cvsserver: always initialize state in argsplit()
Other code assumes that this is initialized, so do it even if there were no arguments given. Signed-off-by: Dirk Koopman <djk@tobit.co.uk> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 5cbf27e..10aba50 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -1813,14 +1813,14 @@ sub req_annotate
# the second is $state->{files} which is everything after it.
sub argsplit
{
- return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );
-
- my $type = shift;
-
$state->{args} = [];
$state->{files} = [];
$state->{opt} = {};
+ return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );
+
+ my $type = shift;
+
if ( defined($type) )
{
my $opt = {};