Questions tagged [libgit2]

libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant linkable library with a solid API, allowing you to write native speed custom Git applications in any language which supports C bindings.

libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant linkable library with a solid API, allowing you to write native speed custom Git applications in any language which supports C bindings.

It is under active development, spear-headed by GitHub and Microsoft.

Along with the C API, bindings exists for many languages, including Ruby, .Net, Python and Objective-C.

629 questions
0
votes
1 answer

Can't access to new_start, old_start etc. properties of hunk

I was using older version of rugged for long time and now I would like to upgrade to newest version. In development branch I've discovered that something is wrong with hunk class properties like: old_start, new_start, old_lines, new_lines - I can't…
Piotr
  • 21
  • 2
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
1 answer

libgit2 - diff on two text blobs

I would like to program something similar to "git diff blobish blobish" with libgit2 here is my code so far git_repository* repo; git_repository_open(&repo, path/to/repository); git_blob *oldBlob, *newBlob; git_oid old_oid, new_oid; const char*…
exTrace101
  • 104
  • 10
0
votes
1 answer

Un-stage file with libgit2

Using objective-git and libgit2 it has been fairly easy to stage a file ready for commit: GTIndex *repoIndex = [self.repository indexWithError:&error]; [repoIndex removeFile:path error:&error]; if (status != GTFileStatusIgnored && status !=…
Joshua
  • 15,200
  • 21
  • 100
  • 172
0
votes
1 answer

Pull (fetch & merge) with libgit2

I've been using objecitive-git and libgit2 to try to implement pull functionality. As git pull is just a 'porcelain' command and is made up of a git fetch followed by a git merge origin/master then that would be how I implemented it. The fetch is…
Joshua
  • 15,200
  • 21
  • 100
  • 172
0
votes
1 answer

How perform the local libgit2 test cases

I want to add an API like git_merge_octopus_bases, but how perform the local test cases? Could please show me some documents for this kind topics.
Aimeast
  • 1,609
  • 14
  • 29
0
votes
2 answers

Can a git repository have N working trees

I try to write a file store based on libgit2. Software snapshots should be saved as branches mysoftware and specific versions committed and tagged. Then later I want to checkout the tags to different directories. When looking at git_checkout_tree,…
abergmeier
  • 13,224
  • 13
  • 64
  • 120
0
votes
2 answers

Getting Rugged::NetworkError on #connect

I tried to implement fetch and this exception was raised: Rugged::NetworkError: This transport isn't implemented. Sorry I am able to retrieve a remote instance: remote = Rugged::Remote.lookup(repo, remote_name) remote.connect(:fetch) # =>…
rhodee
  • 1,257
  • 1
  • 14
  • 27
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

Why Am I getting an error "NoMemory" by Libgit2 when commiting files?

I am using Visual Studio Online and Git using Visual Studio 2013 as a client. I am trying to add files to my repo and when I commit them, I get the following error in the Team Explorer Window: An error occurred. Detailed message: An error was…
ATL_DEV
  • 9,256
  • 11
  • 60
  • 102
0
votes
1 answer

A sha value represent to the status for git repository

There is a sha value represent to the status for git repository in current status? The sha value to be updated each time the Object Database updated and References changed if git has this sha value. In other words, the sha value represent to the…
Aimeast
  • 1,609
  • 14
  • 29
0
votes
1 answer

is libgit2 automatically packing repositories

I did not see a garbage collection command in LibGit2 so I was wondering if it is currently automatically packing files in a local repository.
0
votes
2 answers

Removing a boost::filessystem directory that has had a git_repository cloned to it by git_clone

I'm using boost::filesystem and libgit2 to clone a git repository to my pc. It all works fine until I am finished and try to remove the directory to which I cloned the repository. When doing this I get a R6010 abort(). Here is the code so…
user2983377
  • 166
  • 1
  • 4
0
votes
1 answer

Encryption in or used by libgit2 and libgit2sharp? Export Control Classification Numbers?

Do libgit2 and libgit2sharp have Export Control Classification Numbers (ECCN)? If so, where can I find them? (I didn't find them on github for either project.) If not, does either contain encryption? And, does either use encryption, including…
0
votes
2 answers

How to correctly link libgit2 to C program using cmake?

First of all, i'm just a newbie in a CMake magic. And i just want to link libgit2 to my simple C program in CMake way (FindLibgit2.cmake). As i understand from cmake documentation my CMakeLists.txt should looks like that:…
eraxillan
  • 1,552
  • 1
  • 19
  • 40