Questions tagged [libgit2sharp]

.NET and Mono open source bindings for libgit2, a native Git library

LibGit2Sharp is an thin .NET/Mono layer wrapping the libgit2 linkable C Git library.

It provides a very opiniated API which should be very easy to use and discover.

Online resources

503 questions
0
votes
1 answer

How to download files/subfolders from Git using libgit2sharp

From ASP.NET application I want to download specific files and subfolders that are present in Git remote repository using LibGit2Sharp. For Example : Main Remote Repository URL : https://github.com/macmillanhighered/TestApplication Sub folder URL :…
Nitin
  • 1
  • 1
0
votes
1 answer

How to perform some action when a user pushes to a remote git repo

I have a service where users can 'deploy' data, but right now they have to manually execute the deployment once they make updates. I would like to do it automatically when they push to a remote git repo that this service has access to. Lets say the…
wlyles
  • 2,236
  • 1
  • 20
  • 38
0
votes
1 answer

Is there a way to fetch a specific tag from a remote git repository using libgit2sharp ?

I set up a remote called 'origin' and clone the remote into the local directory with checkout set to false so I can fetch the remote tags. I can list the remote tags but I can't find any way to fetch the contents. If I call clone with checkout set…
user1016736
  • 390
  • 4
  • 7
0
votes
1 answer

Is it possible to apply a patch using libgit2sharp

Is it possible to apply a patch using libgit2sharp. I am looking for an equivalent of git apply --check fix_empty_poster.patch
R.D
  • 4,781
  • 11
  • 41
  • 58
0
votes
0 answers

Can't update from a remote repository after having local changes

I'm currently trying to update my local repository from a remote one. This works as long as I don't have any local changes in my files. using (var r = new LibGit2Sharp.Repository(repo)) { var options = new MergeOptions { …
Cosmo
  • 138
  • 5
0
votes
1 answer

libgit2sharp.Patch outofmemory

I try to use libgit2sharp.Patch to find how much line added or deleted, but i got an error while i try to run it. When i run my asp.net mvc project in debug mode, it doesn't have any problem, until i run it without debug mode, i got my web load too…
aji
  • 651
  • 1
  • 5
  • 10
0
votes
1 answer

LibGit2Sharp Find release for commit

In github I can view a commit and view all the releases it was part of. I am trying to do something similar with LibGit2Sharp. I can find a commit and I can find a release, but I can't see how to tell if a commit was in a release or not. Is this…
ilivewithian
  • 19,476
  • 19
  • 103
  • 165
0
votes
2 answers

Getting diff of the merged commit using LibGit2Sharp

Does LibGit2Sharp have an equivalent of the command: git diff-tree --patch-with-raw --cc I could see which files were merged with and without changes
igoryok.zp
  • 63
  • 6
0
votes
1 answer

get git config username that pushed to the server

I want to try to get information of local git that pushed to my git server, so I can use username as an user in my authorization and then user just need to put their password. How can I solve this problem because I can't get that information. I used…
aji
  • 651
  • 1
  • 5
  • 10
0
votes
1 answer

Does libgit2sharp provide public bindings for the smart transport protocol?

I am attempting to implement the smart HTTP transport protocol in an Asp.Net MVC application. Ultimately, my goal is to enforce permissions at a branch level rather than for the whole repository. To this point, I have implemented a parser for the…
0
votes
2 answers

LibGit2Sharp Count how often a file has changed

I have got a repository with more than 10.000 entries. I dont want to take care about renamed files. What would be the best approach to count the number of changes done to a file? My idea was to iterate over all commits and comparing the target.sha…
JoeLiBuDa
  • 219
  • 2
  • 10
0
votes
2 answers

How to easily get all Refs for a given Commit?

Is there an easy way to find all References (e.g. Tags) for a given Commit? For example: using( Repository repo = new Repository( path_to_repo ) ) { foreach( Commit commit in repo.Commits ) { List assignedRefs =…
zpete
  • 1,725
  • 2
  • 18
  • 31
0
votes
0 answers

Libgit2sharp- NoMemory exception on fetch

I've been running round in circles for days now, I'm trying to implement a "pull" command which I understand libgit2sharp doesn't implement directly. I understand that I have to fetch from the remote and then merge this. I came up with the following…
Steamos
  • 1
  • 1
  • 1
0
votes
1 answer

Does a Timeout for remote of Libgit2sharp

I got a timeout exception when I push a big repository to a remote. How to set the timeout for remote? UPDATE: error message LibGit2Sharp.LibGit2SharpException: An error was raised by libgit2. Category = Invalid (Error). Failed to receive response:…
Aimeast
  • 1,609
  • 14
  • 29
0
votes
1 answer

Supply Credentials when Git Clone

i am using Bonobo.Git.Server as my Git Repo Server. how can i pass in credientials to clone a repo? Below is the c# code i use. but i keep getting this error, ERROR_An error was raised by libgit2. Category = Invalid (Error). Failed to parse…
KS Kian Seng
  • 319
  • 1
  • 6
  • 14