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

I use git_index_add_from_workdir to add, but why git_index_entrycount return 0?

I use git_index_add_from_workdir to add, but why git_index_entrycount return 0? and another question, I clone a git from remote, and git_index_entrycount also return 0? Why? below is the code that how I got the IndexCount , I first create a new…
alexqinbj
  • 1,091
  • 3
  • 13
  • 27
0
votes
1 answer

how to use libgit2 to get a SHA value when i want to commit a new file to git

how to use libgit2 to get a SHA value when i want to commit a new file to git The command in shell is: git add git commit git pull git push
alexqinbj
  • 1,091
  • 3
  • 13
  • 27
-1
votes
1 answer

How to build openssl-sys for android?

I wrote a program that uses the git2 library and it compiled fine on my local machine (Macbook M2,openssl installed using brew), but when I tried to compile the program for Android, it gave me an "error: failed to run custom build command for…
PP Kun
  • 11
  • 4
-1
votes
1 answer

How to include libgit2 via cmake with source-core

I want to import libgit2 as source code in my demo I use macOS Monterey with Apple M1 and Jetbrains Clion This is my dir-structure demo |--CMakeLists.txt |--libgit2(from git clone with v1.5.0) …
bppleman
  • 171
  • 6
-1
votes
1 answer

Libgit2 how to discard/revert changes if the file

I'm searching a way to discard all changes of file with path. in libGit2Sharp there is exist method CheckoutOptions options = new CheckoutOptions { CheckoutModifiers = CheckoutModifiers.Force }; repo.CheckoutPaths("49916", checkoutPaths,…
Andrew_STOP_RU_WAR_IN_UA
  • 9,318
  • 5
  • 65
  • 101
-1
votes
1 answer

Using git2go clone on CloudRun

I'm trying to use https://github.com/libgit2/git2go for cloning repository from GCP Source repository But, I'm getting failed to resolve path '/tmp/repo/.git/': No such file or directory" By using gcloud source repo clone, it works. func…
Dasio
  • 67
  • 1
  • 7
-1
votes
1 answer

pull using libgit2, c++

I try pull from remote master to local master. In remote master only one not synchronized commit. Error in method git_annotated_commit_lookup(): Git Error -3 : object not found - no match for id (08f4a8cc00400100f083caccd755000020299210) In…
Illya
  • 9
  • 3
-1
votes
2 answers

Rename and update tree entry in one commit using libgit2

I use libgit2 in C++ project for my custom objects store. I use git_tree_create_updated function from libgit2 for updating trees. There is a problem for me to do both move and update operation for some tree in one commit. If i remove old tree in old…
Caxa
  • 19
  • 1
  • 3
-1
votes
1 answer

How to get a named branch?

I am using LibGit2Sharp and would like to get the latest commit of a specific branch, but, due to lacking documentation or my own fault I cannot find out how to achieve this. Therefore, what's the easiest way to get the current commit of a specific…
Wilbert
  • 7,251
  • 6
  • 51
  • 91
-2
votes
1 answer

How to connect to TFS Server using libgit2?

I know git-credential-manager.exe is used to connect to TFS server, so, I want to use git-credential-manager.exe to connect to TFS server using libgit2. How would I do this?
alpha
  • 43
  • 6
-2
votes
2 answers

Does LibGit2Sharp ensures that the data being cloned from the Repository is the same as what we receive on our end?

I am working on an application that uses LibGit2Sharp to clone the data from Git Repositories. I want to know that whether LibGit2Sharp does any data integrity checks like SHA-1 after the clone is finished(successful or not) to ensure that no data…
-2
votes
1 answer

GitCandy cannot create repository when it is deployed

I successfully compiled and tested GitCandy from Visual Studio and IIS Express. However when I deploy it to a non Express IIS, the repository creation fails. I added some extra error logging to the file operations on the GitCandy source level. What…
Csaba Toth
  • 10,021
  • 5
  • 75
  • 121
-2
votes
2 answers

libgit2 - Foreground vs. Background

I am writing a Qt application using the libgit2 API. Certain functions are obviously placed in a background thread: git_remote_fetch Others are easily done inline in the foreground thread (i.e., validation within a clicked…
Dan Paulat
  • 152
  • 6
-3
votes
1 answer

History of git and libgit2

git and libgit2 are separate. What's the history behind them? They are both C. Why are they implemented on their own instead of sharing any code? Are people planing to consolidate them? Thank you!
H. Zhao
  • 1
  • 3
1 2 3
41
42