X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=bak-git-server.pl;h=5ba7e17d7899a04cbf35591e8663447d794f2087;hb=f048214ce57ce4471cab1b6e18e73a97138ee18c;hp=e50805d4bcd069a27d752bc293e06900eed17e2d;hpb=91638a5a5b3c933f019275652862524a29413b39;p=bak-git.git diff --git a/bak-git-server.pl b/bak-git-server.pl index e50805d..5ba7e17 100755 --- a/bak-git-server.pl +++ b/bak-git-server.pl @@ -34,6 +34,7 @@ bak command, overview: bak cat [host:]/path bak grep pattern + bak find filename-pattern bak - push all changed files to server @@ -276,6 +277,8 @@ while (my $client = $server->accept()) { print $client `git show $rel_path`; } elsif ( $command eq 'grep' ) { print $client `git log -g --grep=$rel_path`; + } elsif ( $command eq 'find' ) { + print $client `find . -iname '*$rel_path*' | sed -e 's,^./,,' -e 's,/,:/,'` } elsif ( $command eq 'link' ) { if ( $on_host ) { mkbasedir "$on_host/$path";