cvsserver: Do not include status output for subdirectories if -l is passed
authorDamien Diederen <dash@foobox.net>
Thu, 27 Mar 2008 22:17:53 +0000 (23:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 Mar 2008 23:05:27 +0000 (16:05 -0700)
This effectively implements the -l switch by pruning the entries whose
filenames contain a path separator.  It was previously ignored.

Without this, TkCVS includes strange "ghost" entries in its directory
listings.

Signed-off-by: Damien Diederen <dash@foobox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-cvsserver.perl

index 444ec0db797dff8e99d9f619912154c6416925d2..89a4dac291b1d6626b769c91cafc653658cf53cf 100755 (executable)
@@ -1428,6 +1428,8 @@ sub req_status
     {
         $filename = filecleanup($filename);
 
+        next if exists($state->{opt}{l}) && index($filename, '/', length($state->{prependdir})) >= 0;
+
         my $meta = $updater->getmeta($filename);
         my $oldmeta = $meta;