Closed quantjin closed 9 years ago
Hello, libgit2 team
First, great project!
I have a question regarding the mysql backend: This is the code to create a blob from buffer, it's a string.
const char str[] = "Hello, World!"; git_blob_create_frombuffer(&oid, mysql_odb_backend->repo, str, strlen(str));
The blob successfully inserted to the odb table, the uncompress(data) is the string content
But I don't understand the oid column value, as according to git concept, it's sha1 value of the data content, please correct me if I'm wrong.
So I did a validation
select lower(hex(oid)), type, size, convert(uncompress(data),char(100)), sha1(uncompress(data)) from git2_odb
result:
I found that the hex oid value is not the same as sha1 data, is this correct? or I'm doing it in the wrong way?
Thank you!
Best Regards, Jerry
Hello, libgit2 team
First, great project!
I have a question regarding the mysql backend: This is the code to create a blob from buffer, it's a string.
The blob successfully inserted to the odb table, the uncompress(data) is the string content
But I don't understand the oid column value, as according to git concept, it's sha1 value of the data content, please correct me if I'm wrong.
So I did a validation
result:
I found that the hex oid value is not the same as sha1 data, is this correct? or I'm doing it in the wrong way?
Thank you!
Best Regards, Jerry