The second chunk of code uses rev-parse syntax (seeBranch Referencesfor more on this) to get the commit that HEAD eventually points to. The type returned is agit_objectpointer, which represents something that e
The Rugged::BranchCollection object returned by Repository#branches will help you with all of your branch-related needs.Iterate over all branches:repo.branches.each_name().sort # => ["master", "origin/HEAD", "origin/master", "origin/packed"] repo.branches.each_name(:local).sort # => [...
You must free it when you no longer need it. git_config_get_string() will return an error if used on a non-snapshot configuration, as there can be no guarantee that the returned pointer is valid. git_note_default_ref() now uses a git_buf to return the string, as the string is ...
The second chunk of code uses rev-parse syntax (seeOdniesienie do gałęzifor more on this) to get the commit that HEAD eventually points to. The type returned is agit_objectpointer, which represents something that exists in the Git object database for a repository.git_objectis actually ...
I git this error while testing the new Shallow clone in VSTS: https://www.visualstudio.com/en-us/docs/build/define/repository#git And then at the end of the script, I got: ##[error]System.Exception: Unexpected exit code 1 returned from tool GitVersion.exe at Microsoft.TeamFoundation.Dis...
The type returned is a git_object pointer, which represents something that exists in the Git object database for a repository. git_object is actually a “parent” type for several different kinds of objects; the memory layout for each of the “child” types is the same as for git_object...
Fix error in the test suite when running with address sanitizer#1304#1301 Annotations and documentation fixes#1293 1.15.0 (2024-05-18) Many deprecated features have been removed, see below Upgrade to libgit2 v1.8.1 Newpush_optionsoptional argument inRepository.push(...)#1282 ...
The type returned is a git_object pointer, which represents something that exists in the Git object database for a repository. git_object is actually a “parent” type for several different kinds of objects; the memory layout for each of the “child” types is the same as for git_object...
Along similar lines, the git_signature structure may be returned by a libgit2 function. The lg2 package defines the script level struct of the same name. Now a pointer to a git_signature may come either from libgit2 function or by from the CFFI allocating commands git_signature allocate or...
Most public APIs should return aninterror code. As is typical with most C library functions, a zero value indicates success and a negative value indicates failure. Some bindings will transform these returned error codes into exception types, so returning a semantically appropriate error code is imp...