libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

Custom refdb backend support

Open sterlind opened this issue 6 years ago • 3 comments

This is a rewrite of zoxiv's refdb backend PR #1482 (their code here), since that targeted an ancient libgit2 with substantial API changes since then.

Changes due to libgit2:

  • Iterators had to be completely reworked, since foreach and foreach_glob were replaced with a new iterator callback in libgit2. Replaced them with a method that returns IEnumerable<ReferenceData>.
  • libgit2 now "requires" reflog support for backends. I've created stubs for these callbacks, since those APIs are cumbersome, they're not called unless reflog tracking is opted into, and most use cases for custom RefDbs don't require reflog support.

Other changes:

  • Added rename support.
  • Used RefdbBackendExceptions to signal errors, which simplifies the glue and lets native libgit2 error codes be returned.

sterlind avatar Nov 13 '19 09:11 sterlind

It looks like AppVeyor failed with some build machine issue:

git clone -q https://github.com/libgit2/libgit2sharp.git C:\projects\libgit2sharp
fatal: unable to access 'https://github.com/libgit2/libgit2sharp.git/': Failed to connect to github.com port 443: Timed out
Command exited with code 128

Could a maintainer please rerun the check?

sterlind avatar Nov 13 '19 09:11 sterlind

is there any hope this pr will be merged?

workgroupengineering avatar Apr 25 '23 12:04 workgroupengineering

@bording Is it possible for you to look at this? We utilitize the features this PR adds as well and have to maintain our own fork.

kstrohminfor avatar Jul 24 '24 18:07 kstrohminfor