Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
Author[]Andy Green <andy@warmcat.com> 2025-05-10 10:50 UTC
Committer[]Andy Green <andy@warmcat.com> 2025-05-10 10:50 UTC
Tree2696702ed77db78b141e2f76704547a5c0ba1ff7   Raw Patch
 
mirror: show error before freeing repo
mirror: show error before freeing repo
diff --git a/src/builder/b-mirror.c b/src/builder/b-mirror.c index a832de6..75d2657 100644 --- a/src/builder/b-mirror.c +++ b/src/builder/b-mirror.c @@ -601,19 +601,20 @@ thread_repo(void *d) */ n = git_remote_fetch(remote, &rfs, &opts, "fetch"); - - git_remote_free(remote); - git_repository_free(repo_mirror); - - if (n) { #if defined(SAI_HAVE_LIBGIT2_GIT_ERROR) + if (n) { const git_error *e = git_error_last(); if (e) fprintf(stderr, "%s: git error %s\n", __func__, e->message); + } #endif + git_remote_free(remote); + git_repository_free(repo_mirror); + + if (n) { fprintf(stderr, "%s: failed to fetch %s, n: %d\n", __func__, spec, n); goto fail_out;
Page fetched 0s ago, creation time: 5ms (vhost etag hits: 0%, cache hits: 0%)