Honor user's umask.
[gitweb.git] / http-fetch.c
index 7fc363f8ea7ca622330eb17260bf76f977875d03..0566a9125cd698a79f99a44ab9a64e9bd7c30c7d 100644 (file)
@@ -27,7 +27,7 @@ struct alt_base
        struct alt_base *next;
 };
 
-struct alt_base *alt = NULL;
+static struct alt_base *alt = NULL;
 
 static SHA_CTX c;
 static z_stream stream;
@@ -354,7 +354,7 @@ static int fetch_pack(struct alt_base *repo, unsigned char *sha1)
        return 0;
 }
 
-int fetch_object(struct alt_base *repo, unsigned char *sha1)
+static int fetch_object(struct alt_base *repo, unsigned char *sha1)
 {
        char *hex = sha1_to_hex(sha1);
        char *filename = sha1_file_name(sha1);
@@ -529,9 +529,11 @@ int main(int argc, char **argv)
        if ((ssl_cert = getenv("GIT_SSL_CERT")) != NULL) {
                curl_easy_setopt(curl, CURLOPT_SSLCERT, ssl_cert);
        }
+#if LIBCURL_VERSION_NUM >= 0x070902
        if ((ssl_key = getenv("GIT_SSL_KEY")) != NULL) {
                curl_easy_setopt(curl, CURLOPT_SSLKEY, ssl_key);
        }
+#endif
 #if LIBCURL_VERSION_NUM >= 0x070908
        if ((ssl_capath = getenv("GIT_SSL_CAPATH")) != NULL) {
                curl_easy_setopt(curl, CURLOPT_CAPATH, ssl_capath);