chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb5dfd5
)
dgit-repos-server: Use shellquote() where appropriate in diagnostics
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 2 May 2015 19:10:03 +0000
(20:10 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 31 May 2015 10:54:09 +0000
(11:54 +0100)
infra/dgit-repos-server
patch
|
blob
|
history
diff --git
a/infra/dgit-repos-server
b/infra/dgit-repos-server
index 63f9aac081df8284e08c4b8ae9304d4114ab9a8e..7925d04510515acc6cb16e0a51d8af00ec273e03 100755
(executable)
--- a/
infra/dgit-repos-server
+++ b/
infra/dgit-repos-server
@@
-263,7
+263,7
@@
sub runcmd {
debugcmd '+',@_;
$!=0; $?=0;
my $r = system @_;
debugcmd '+',@_;
$!=0; $?=0;
my $r = system @_;
- die
"@_
$? $!" if $r;
+ die
(shellquote @_)."
$? $!" if $r;
}
sub policyhook {
}
sub policyhook {
@@
-274,8
+274,9
@@
sub policyhook {
debugcmd '+',@cmd;
my $r = system @cmd;
die "system: $!" if $r < 0;
debugcmd '+',@cmd;
my $r = system @cmd;
die "system: $!" if $r < 0;
- die "hook (@cmd) failed ($?)" if $r & ~($policyallowbits << 8);
- printdebug sprintf "hook (%s) => %#x\n", "@polargs", $r;
+ die "hook (".(shellquote @cmd).") failed ($?)"
+ if $r & ~($policyallowbits << 8);
+ printdebug sprintf "hook (%s) => %#x\n", (shellquote @polargs), $r;
return $r >> 8;
}
return $r >> 8;
}
@@
-889,7
+890,7
@@
sub parseargsdispatch () {
if ($ARGV[0] eq '--pre-receive-hook') {
if ($debuglevel) {
$debugprefix.="=";
if ($ARGV[0] eq '--pre-receive-hook') {
if ($debuglevel) {
$debugprefix.="=";
- printdebug "in stunthook
@ARGV
\n";
+ printdebug "in stunthook
".(shellquote @ARGV)."
\n";
foreach my $k (sort keys %ENV) {
printdebug "$k=$ENV{$k}\n" if $k =~ m/^DGIT/;
}
foreach my $k (sort keys %ENV) {
printdebug "$k=$ENV{$k}\n" if $k =~ m/^DGIT/;
}