chiark / gitweb /
dgit: WWW::Curl Set $response_body to '' explicitly
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 6401524ed90dee03c18914a330c99c17fa02b36a..f7b5025f5717e4565115c2c6023368b9d3f64d3e 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1191,7 +1191,7 @@ sub url_fetch ($;@) {
        confess "$k $v ".$curl->strerror($x)." ?" if $x;
     };
 
-    my $response_body;
+    my $response_body = '';
     $setopt->(CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS|CURLPROTO_HTTP);
     $setopt->(CURLOPT_URL,             $url);
     $setopt->(CURLOPT_NOSIGNAL,        1);
@@ -1792,7 +1792,9 @@ sub check_for_git () {
            CurlOpts => { CURLOPT_NOBODY() => 1 },
            Ok404 => 1,
            AccessBase => 'git-check';
-       return defined $result;
+       $result = defined $result;
+       printdebug "dgit-repos check_for_git => $result.\n";
+       return $result;
     } elsif ($how eq 'true') {
        return 1;
     } elsif ($how eq 'false') {