execute commands on current path
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 19 Oct 2010 15:01:57 +0000 (17:01 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 19 Oct 2010 15:01:57 +0000 (17:01 +0200)
This fixes long-snanding bug in which "bak diff" (and other commands)
would return diff of whole host as opposed to working directory

bak-git-server.pl

index 6c8a8f9..4776cc5 100755 (executable)
@@ -168,7 +168,7 @@ while (my $client = $server->accept()) {
                        }
                } else {
                        # commands without path will show host-wide status/changes
-                       my $backup_path = $rel_path ? $backup_path : "$hostname/";
+                       my $backup_path = $path ? "$hostname/$path" : "$hostname/";
                        # hostname must end with / to prevent error from git:
                        # ambiguous argument 'arh-hw': both revision and filename
                        # to support branches named as hosts