[Lxr-commits] CVS: lxr/templates lxr.conf,1.60,1.61
Brought to you by:
ajlittoz
From: Andre-Littoz <ajl...@us...> - 2014-03-10 10:26:30
|
Update of /cvsroot/lxr/lxr/templates In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17641/templates Modified Files: lxr.conf Log Message: templates/lxr.conf: fix for bug #248 (faulty 'range' function fot GIT) The cooked function contains two "queries" (on tags, then heads) to collect a comprehensive set of versions into array @files. These queries are supposed to be cumulative, therefore @files should be global to the function instead of being redeclared in the query. Declaration moved at head of function. Index: lxr.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxr.conf,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- lxr.conf 17 Nov 2013 09:13:21 -0000 1.60 +++ lxr.conf 10 Mar 2014 10:26:27 -0000 1.61 @@ -313,16 +313,17 @@ #- , 'range' => sub { my $some_dir; + my @files; ##### You can comment out one of the following blocks ##### if you want to limit the set of versions $some_dir = '%GITrepo%/refs/tags'; opendir (DIR, $some_dir) or die "can\'t opendir $some_dir: $!"; - my @files = grep { -f "$some_dir/$_" } readdir (DIR); + unshift @files, grep { -f "$some_dir/$_" } readdir (DIR); closedir DIR; ##### Add more $some_dir = "%GITrepo%/refs/heads"; opendir (DIR, $some_dir) or die "can\'t opendir $some_dir: $!"; - my @files = grep { -f "$some_dir/$_" } readdir (DIR); + unshift @files, grep { -f "$some_dir/$_" } readdir (DIR); closedir DIR; ##### End of enumeration unshift (@files, 'HEAD'); |