additional git error info

I ran into this a couple of times where the debug output didn't seem to
make any sense until I understood that libgit simply didn't give me
detailed error info.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2023-12-28 11:05:25 -08:00
parent 7792e227da
commit f4cac010ae

View file

@ -887,6 +887,8 @@ static bool create_local_repo(struct git_info *info)
if (giterr_last()) {
msg = giterr_last()->message;
SSRF_INFO("git storage: error message was %s\n", msg);
} else {
SSRF_INFO("git storage: giterr_last() is null\n");
}
char *pattern = format_string("reference 'refs/remotes/origin/%s' not found", info->branch);
// it seems that we sometimes get 'Reference' and sometimes 'reference'