X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=http-fetch.c;h=ad59f1cce61d73fa832828aabb880f082debf94d;hb=710b7098e28513355cbdbedbb8d9c35ce5b4a488;hp=53a7dbf40c0e0993da2994cb1216e6b8a0b7fc66;hpb=e388ab74dbaea5cdbf07b175be8d6980579392f4;p=git.git diff --git a/http-fetch.c b/http-fetch.c index 53a7dbf4..ad59f1cc 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -637,10 +637,18 @@ static int fetch_indices(struct alt_base *repo) if (start_active_slot(slot)) { run_active_slot(slot); if (slot->curl_result != CURLE_OK) { - free(buffer.buffer); - return error("%s", curl_errorstr); + if (slot->http_code == 404) { + repo->got_indices = 1; + free(buffer.buffer); + return 0; + } else { + repo->got_indices = 0; + free(buffer.buffer); + return error("%s", curl_errorstr); + } } } else { + repo->got_indices = 0; free(buffer.buffer); return error("Unable to start request"); } @@ -914,6 +922,8 @@ int main(int argc, char **argv) int arg = 1; int rc = 0; + setup_git_directory(); + while (arg < argc && argv[arg][0] == '-') { if (argv[arg][1] == 't') { get_tree = 1;