summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d90095)
raw | patch | inline | side by side (parent: 7d90095)
author | Martyn Smith <martyn@catalyst.net.nz> | |
Tue, 28 Mar 2006 01:24:27 +0000 (13:24 +1200) | ||
committer | Martin Langhoff <martin@catalyst.net.nz> | |
Sun, 7 May 2006 22:38:31 +0000 (10:38 +1200) |
(Now you can rightclick any directory and select team-update/team-commit) and it should work
git-cvsserver.perl | patch | blob | history |
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index f3149bbc413c3a1eaa0018ce8e7b519b0ca462be..5ccca4f99f31b9fa370baaf7e85795ed2bf49f13 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
$log->debug("Prepending '$state->{prependdir}' to state|directory");
$state->{directory} = $state->{prependdir} . $state->{directory}
}
-
- $log->debug("req_Directory : localdir=$data repository=$repository directory=$state->{directory} module=$state->{module}");
+ $log->debug("req_Directory : localdir=$data repository=$repository path=$state->{path} directory=$state->{directory} module=$state->{module}");
}
# Entry entry-line \n
$state->{args} = [] if ( scalar(@{$state->{args}}) == 1 and $state->{args}[0] eq "." );
- return if ( scalar ( @{$state->{args}} ) > 0 );
+ return if ( scalar ( @{$state->{args}} ) > 1 );
- $log->info("No args specified, populating file list automatically");
+ if ( scalar(@{$state->{args}}) == 1 )
+ {
+ my $arg = $state->{args}[0];
+ $arg .= $state->{prependdir} if ( defined ( $state->{prependdir} ) );
- $state->{args} = [];
+ $log->info("Only one arg specified, checking for directory expansion on '$arg'");
- foreach my $file ( @{$updater->gethead} )
- {
- next if ( $file->{filehash} eq "deleted" and not defined ( $state->{entries}{$file->{name}} ) );
- next unless ( $file->{name} =~ s/^$state->{directory}// );
- push @{$state->{args}}, $file->{name};
+ foreach my $file ( @{$updater->gethead} )
+ {
+ next if ( $file->{filehash} eq "deleted" and not defined ( $state->{entries}{$file->{name}} ) );
+ next unless ( $file->{name} =~ /^$arg\// or $file->{name} eq $arg );
+ push @{$state->{args}}, $file->{name};
+ }
+
+ shift @{$state->{args}} if ( scalar(@{$state->{args}}) > 1 );
+ } else {
+ $log->info("Only one arg specified, populating file list automatically");
+
+ $state->{args} = [];
+
+ foreach my $file ( @{$updater->gethead} )
+ {
+ next if ( $file->{filehash} eq "deleted" and not defined ( $state->{entries}{$file->{name}} ) );
+ next unless ( $file->{name} =~ s/^$state->{prependdir}// );
+ push @{$state->{args}}, $file->{name};
+ }
}
}
}
$filename =~ s/^\.\///g;
- $filename = $state->{directory} . $filename;
+ $filename = $state->{prependdir} . $filename;
return $filename;
}