libgit2 / libgit2-backends Goto Github PK
View Code? Open in Web Editor NEWStandalone ODB backends for the libgit2 library
Standalone ODB backends for the libgit2 library
It would be good to add a LICENSE.md to this repo to clarify what the distribution terms are. I would assume that it is under the same license as https://github.com/libgit2/libgit2, but again clarification from the project is appreciated.
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:
lower(hex(oid)) | type | size | convert(uncompress(data),char(100)) | sha1(uncompress(data)) |
---|---|---|---|---|
b45ef6fec89518d314f546fd6c3025367b721684 | 3 | 13 | Hello, World! | 0a0a9f2a6772942557ab5355d76af442f8f65e01 |
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
Hi!
The mysql backend seems quite out of date.
Are you considering updating it? If not, do you know of any other projects doing the same thing?
Thanks in advance
Does this mean git is backed by redis if i use the redis backend?
Is there one developed for ssdb from ideawu?
index should be 1
libgit2-backends/redis/hiredis.c
Line 81 in b2b968f
I'm on OSX Yosemite and I can't build the memcached backend.
Here are the steps I'm executing:
brew install libmemcached
brew install libgit2
git clone https://github.com/libgit2/libgit2-backends.git
cd libgit2-backends
cmake memcached
cmake --build .
Here is partial output from the build step:
$ cmake --build .
Scanning dependencies of target git2-memcached
[100%] Building C object CMakeFiles/git2-memcached.dir/memcached.c.o
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:34:18: error: field has incomplete type 'git_odb_backend' (aka 'struct git_odb_backend')
git_odb_backend parent;
^
/usr/local/include/git2/types.h:84:16: note: forward declaration of 'struct git_odb_backend'
typedef struct git_odb_backend git_odb_backend;
^
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:81:10: error: use of undeclared identifier 'GIT_ENOMEM'
return GIT_ENOMEM;
^
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:85:10: error: use of undeclared identifier 'GIT_ENOMEM'
return GIT_ENOMEM;
^
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:105:12: error: use of undeclared identifier 'GIT_SUCCESS'
status = GIT_SUCCESS;
...
It appears that the compiler can't find libgit2, but cmake seemed to find it just fine in the cmake memcached
step.
I wonder if it is possible to have multiple repositories per for example a single mysql database?
And is there also a refdb backend for mysql?
Should hiredis.c return a git_error_code type and not git_error_t? Libgit2 checks for if (error < 0) which does not catch git_error_t types.
This manifested in a nullptr instead of an error when trying git_blob_lookup_prefix against hiredis backend.
See https://github.com/libgit2/libgit2-backends/blob/master/redis/hiredis.c#L158 and https://github.com/libgit2/libgit2/blob/master/src/object.c#L190.
Is it possible to use ssdb instead of redis?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.