2

Does libgit2sharp support custom backend configuration (similar to https://github.com/libgit2/libgit2-backends)?

1 Answer 1

3

Indeed, libgit2 exposes the concepts of pluggable backends: There are 3 of them: object database, reference database and configuration storage.

From the LibGit2sharp latest release (v0.21) standpoint:

  • The object database backend is already available through LibGit2Sharp. You can find a sample implementation at https://github.com/nulltoken/libgit2sharp.voron

  • The reference database isn't done yet. There's an ongoing PR (#401) to work on this, but it's very outdated.

  • Nothing exist yet regarding the configuration storage from the LibGit2Sharp standpoint.

This is discussed further in an open LibGit2Sharp feature request (Add In-Memory Repository Support).

7
  • Thanks. In your experience, how easy it would be to plugin something like Cassandra or other K-V store?
    – factotum
    Jan 30, 2015 at 6:55
  • The Voron based implementation comes with tests that enforce the behavior the custom OdbBackend behaves as expected. The same tests are run against a file based .git repository and against a Voron based one. If you can make your own implementation pass against those tests, you should be safe. Those tests actually provides you with a safety net regarding what is expected to happen when plugging in you own custom backend.
    – nulltoken
    Jan 30, 2015 at 10:27
  • 2
    Regarding the ease of plugging the underlying technology, well... it depends a bit on the technology. For instance, Voron wasn't so hard to plug. @synhershko also worked on using ElasticSearch as an odb backend (see github.com/synhershko/libgit2sharp.Elasticsearch) and didn't seem to suffer much.
    – nulltoken
    Jan 30, 2015 at 10:27
  • Great. Appreciate your help.
    – factotum
    Jan 31, 2015 at 10:46
  • @msingh If this answer was useful to you, maybe would you consider accepting/upvoting it? ;-)
    – nulltoken
    Jan 31, 2015 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.