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

How to use git_cred_ssh_publickey_new()

I'm currently wrapping the git_cred API in Objective-Git, and I don't understand some of the expected arguments. For reference, here are the "offending" prototypes : int git_cred_ssh_publickey_new( git_cred **out, const char *username, …
tiennou
  • 487
  • 3
  • 13
0
votes
1 answer

git_index_get_byindex vs git_status_foreach_ext

It looks like git_index_get_bypath and git_status_foreach_ext (with GIT_STATUS_SHOW_INDEX_ONLY) are just different ways of reading the index. What are the differences, and why would I use one vs. the other?
Uncommon
  • 3,323
  • 2
  • 18
  • 36
0
votes
1 answer

Is there a way to commit part of modified files (all files are staged) by using libgit2sharp?

Is there a way to commit part of modified files (all files are staged) by using libgit2sharp? There are no Commit method in Repository that takes path parameter.
Jifan Wang
  • 67
  • 5
0
votes
0 answers

HTTP parser error : invalid constant string in libgit2

I am trying to clone a git repo using libgit2 but the following code is throwing error even though it is taken from examples . int do_clone(git_repository *repo, string url, string path) { progress_data pd = {{0}}; git_repository…
Captain Barbossa
  • 1,067
  • 10
  • 16
0
votes
1 answer

How much the libgit2 test failed? (How should I interpret the results?)

I have fetched/merged the last changes from the libgit2 repository (the commit 4ae29053d5), created the build subdirectory, and compiled the library on Windows 7 using Visual Studio 2010 this way: e:\Software\libgit2\build>cmake .. -G"Visual Studio…
pepr
  • 20,112
  • 15
  • 76
  • 139
0
votes
1 answer

move the reference to working directory using libgit2sharp

I want to change the reference to the working directory to a different place using LibGit2Sharp in a Visual C++ project. it seems to me that Repository::Init() with RepositoryOptions can set the working directory to a non-default place. What I am…
0
votes
1 answer

how to add subdirectory with libgit2

I need to commit all workdir, but I can't find any solution that can adds the subdirectories to the index. I've tried with git_index_add_bypath() but it's seems to not add the tree for the subdirectories. I'm using Qt and the libgit2 for c, because…
pacix
  • 3
  • 1
0
votes
2 answers

How to use libgit2 from a native C++ application on Windows? (Microsoft VC++)

Summary: Is there any tiny example on how to build the Win32 C++ console application that uses the libgit2 library (sources available at GitHub)? I have followed the readme and the wiki on how to build the library on Windows using the CMake, and it…
pepr
  • 20,112
  • 15
  • 76
  • 139
0
votes
1 answer

Attempt to use git_clone function resulting in segfault

Here is my code: #include #include int main(void) { void *libgit2; int (*racket_git_clone)(); git_repository **out; const git_clone_options *options; libgit2 = dlopen("libgit2.so", RTLD_LAZY); …
Alex V
  • 3,416
  • 2
  • 33
  • 52
0
votes
0 answers

How to use SSH support in libgit2?

As i see from this question, libgit2 is now supporting use of ssh repository urls. But how to force it to work? as i understood from CMakeLists file, SSH support will be enabled automatically if libssh2 library will be detected. IF(NOT…
eraxillan
  • 1,552
  • 1
  • 19
  • 40
0
votes
1 answer

Creating and committing a tag using libgit2

I've been working with libgit2 a little bit here and there trying to get a better understanding of how Git functions. To that end, I've been implementing a little mini-client as a learning exercise, and it's going pretty well. However, I can't seem…
Tod Hoven
  • 466
  • 2
  • 8
0
votes
1 answer

Coding difference between tracking and staging files

With libgit2 API, is there any difference between 'adding' a file for tracking, or adding a modified file to the staging area? This is the code I am currently using to stage tracked files which are modified: int giterror = git_repository_index(…
Dan
  • 1,513
  • 1
  • 24
  • 34
0
votes
1 answer

LibGit2Sharp fails to find git2.dll

I have built a tiny wpf app that manages a website I am working on. The key feature of this app is that it allows me to checkout different branches of a theme repository. This works perfectly in visual studio, but when I publish, install and run the…
Shattuck
  • 2,744
  • 4
  • 21
  • 26
0
votes
1 answer

Why do libgit2 methods using kernel32.dll's GetProcAddress always return 0?

I have the need to manually handle the loading / unloading of the actual git2.dll, instead of using [DllImport("git2")] in C#. I seem to have issues with creating an IntPtr for reference to the address of methods stored in libgit2. Here're the good…
Xaero Degreaz
  • 1,045
  • 11
  • 18
0
votes
2 answers

repo.path returns nothing even after creating an initializing a rugged repo

I created a git repository using the below code in rugged.. require 'rugged' $repopath='D:\Test12' Rugged::Repository.init_at($repopath, true) repo = Rugged::Repository.new($repopath) puts repo.path however, I didn't get any output when I execute…
Ahmad Osama
  • 91
  • 1
  • 11
1 2 3
41
42