Pregunta

There's a project in our company that features a complex file sync scenario and naturally git came up as a solution. As it is a .net project, libgit2sharp was exactly the API we were looking for.

As it seems from nullpointer's response to this thread, merge is still not implemented and not being able to merge changes from a remote branch could lead us to think on another way to solve this (and we wouldn't like to since the tests we already did with libgit2sharp were really successful).

Is there a possibility or alternative to provide remote merging? Will it be released in the short term?

Thanks in advance.

¿Fue útil?

Solución

Will it be released in the short term?

Merge is bound to be implemented. However, there's no timeline yet. First, this Pull request has to be finalized as part of the ligit2 project. Maybe some additional higher level APIs will also be required. Then it will be made available through LibGit2Sharp.

Is there a possibility or alternative to provide remote merging?

Have you considered temporarily shelling out to "git.exe"?

This is what GitHub for Windows and Git-Tfs do, for instance.

Partly leveraging LibGit2Sharp, and partly relying on git.exe for everything which is not available yet.

Then, once a required feature has been added to LibGit2Sharp, replace the call to git.exe with a call to LibGit2Sharp.

Provided you've put in place some light abstraction layer and some unit tests, this shouldn't be a too bumpy road.

Update

Merge feature is now available in LibGit2Sharp (see pull request #608)

Otros consejos

Since 16/01/2014, merge has been available but as of 23/01/2014, not on NuGet.

To use it anyway, replace the LibGit2Sharp.dll and LibGit2Sharp.xml files in your dependencies folder (maybe: .../your-solution-folder/packages/LibGit2Sharp.0.15.0.0/lib/net35) with the ones from the artifacts of the last successful (green) CodeBetter CI build.

The ones from January 22nd are a drop in replacement and are still marked as v 0.15.0.0 in the assembly properties so it doesn't confuse the NuGet package manager when you manually replace the dll.

I should add that merge works a treat. Those libgit2sharp folks are bloody smart!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top