Closed rralf closed 3 years ago
I can reproduce. Did you try to reproduce with pure libgit2 though? Seems to me like this is reproducible in pure C, which would make this bug unrelated to the pygit2 bindings.
#include <git2.h>
#include <stdio.h>
int main(void)
{
git_repository *repo = NULL;
git_tree_entry *entry = NULL;
git_commit *commit = NULL;
git_tree *tree = NULL;
git_blob *blob = NULL;
const git_error *e;
git_oid oid;
int error;
git_libgit2_init();
error = git_repository_open(&repo, ".");
if (error)
goto err;
error = git_oid_fromstr(&oid, "7c260769a628415a753e77d16b56900c5df3a5c8");
if (error)
goto err;
error = git_commit_lookup(&commit, repo, &oid);
if (error)
goto err;
error = git_commit_tree(&tree, commit);
if (error)
goto err;
error = git_tree_entry_bypath(&entry, tree, "m");
if (error)
goto err;
if (git_tree_entry_type(entry) != GIT_OBJECT_BLOB)
goto err;
error = git_blob_lookup(&blob, repo, git_tree_entry_id(entry));
if (error)
goto err;
git_tree_entry_free(entry);
puts(git_blob_rawcontent(blob));
return 0;
err:
e = git_error_last();
printf("Error %d/%d: %s\n", error, e->klass, e->message);
return error;
}
$ gcc -ggdb -O0 test.c -o test -lgit2 -Wall -Wextra && ./test
Error -1/5: error inflating zlib stream
Narf. I'll report it over there. I guess we can close this for the moment. Thanks.
Check out the bug report on libgit2: https://github.com/libgit2/libgit2/issues/5899
Hi,
This is my environment (Arch Linux, latest packages):
Consider this reproducer:
I constantly receive the following error message:
Any suggestions?
Thanks in advance!