@@ -2028,27 +2028,13 @@ static void fetch_symref(const char *path, char **symref, unsigned char *sha1)
2028
2028
{
2029
2029
char * url ;
2030
2030
struct strbuf buffer = STRBUF_INIT ;
2031
- struct active_request_slot * slot ;
2032
- struct slot_results results ;
2033
2031
2034
2032
url = xmalloc (strlen (repo -> url ) + strlen (path ) + 1 );
2035
2033
sprintf (url , "%s%s" , repo -> url , path );
2036
2034
2037
- slot = get_active_slot ();
2038
- slot -> results = & results ;
2039
- curl_easy_setopt (slot -> curl , CURLOPT_FILE , & buffer );
2040
- curl_easy_setopt (slot -> curl , CURLOPT_WRITEFUNCTION , fwrite_buffer );
2041
- curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , NULL );
2042
- curl_easy_setopt (slot -> curl , CURLOPT_URL , url );
2043
- if (start_active_slot (slot )) {
2044
- run_active_slot (slot );
2045
- if (results .curl_result != CURLE_OK ) {
2046
- die ("Couldn't get %s for remote symref\n%s" ,
2047
- url , curl_errorstr );
2048
- }
2049
- } else {
2050
- die ("Unable to start remote symref request" );
2051
- }
2035
+ if (http_get_strbuf (url , & buffer , 0 ) != HTTP_OK )
2036
+ die ("Couldn't get %s for remote symref\n%s" , url ,
2037
+ curl_errorstr );
2052
2038
free (url );
2053
2039
2054
2040
free (* symref );
0 commit comments