Git-Libgit2

 view release on metacpan or  search on metacpan

lib/Git/Libgit2/FFI.pm  view on Meta::CPAN


    Git::Libgit2::FFI::git_remote_push($remote, $refspecs, $options);

Push using the remote. See also C<git_push_options_init>.

=head2 git_fetch_options_init

    Git::Libgit2::FFI::git_fetch_options_init($opts_ptr, 1);   # GIT_FETCH_OPTIONS_VERSION

Fill a caller-allocated C<git_fetch_options> struct with libgit2's defaults.
Allocate generously (the struct embeds C<git_remote_callbacks> and has grown
across releases) and zero the buffer first.

The struct is B<not> layout-stable between libgit2 versions, so do not compile
in field offsets. For the C<prune> field there is
L<Git::Libgit2/fetch_options_prune_offset>, which probes the offset from the
library this process is linked against.

=head2 git_push_options_init

    Git::Libgit2::FFI::git_push_options_init($opts_ptr, 1);   # GIT_PUSH_OPTIONS_VERSION

Fill a caller-allocated C<git_push_options> struct with libgit2's defaults.
Same allocation caveat as C<git_fetch_options_init>: it embeds
C<git_remote_callbacks> too.

=head2 git_remote_connect

    Git::Libgit2::FFI::git_remote_connect($remote, $direction, $callbacks, $options, $resolved_url);

Connect to the remote.

=head2 git_remote_ls

    Git::Libgit2::FFI::git_remote_ls(\my $heads, \my $len, $remote);

List remote branches. C<$heads> is an array of OID pointers.

=head2 git_remote_disconnect

    Git::Libgit2::FFI::git_remote_disconnect($remote);

Disconnect from the remote.

=head2 git_remote_free

    Git::Libgit2::FFI::git_remote_free($remote);

Free the remote handle.

=head1 CREDENTIALS

=head2 git_credential_userpass_plaintext_new

    Git::Libgit2::FFI::git_credential_userpass_plaintext_new(\my $cred, $username, $password);

Create a username/password credential.

=head2 git_credential_ssh_key_new

    Git::Libgit2::FFI::git_credential_ssh_key_new(\my $cred, $username, $public_key, $private_key, $passphrase);

Create an SSH key credential.

=head2 git_credential_ssh_key_from_agent

    Git::Libgit2::FFI::git_credential_ssh_key_from_agent(\my $cred, $username);

Create an SSH key credential using the ssh-agent.

=head2 git_credential_default_new

    Git::Libgit2::FFI::git_credential_default_new(\my $cred);

Create a default credential (e.g. from GIT_ASKPASS).

=head2 git_credential_username_new

    Git::Libgit2::FFI::git_credential_username_new(\my $cred, $username);

Create a username-only credential.

=head2 git_credential_free

    Git::Libgit2::FFI::git_credential_free($cred);

Free the credential handle.

=head1 CLONE

=head2 git_clone_options_init

    Git::Libgit2::FFI::git_clone_options_init($opts_ptr, $version);

Initialize clone options struct.

=head2 git_clone

    Git::Libgit2::FFI::git_clone(\my $repo, $url, $path, $opts);

Clone a repository. Free the repo with C<git_repository_free>.

=head1 STRARRAY

=head2 git_strarray_free

    Git::Libgit2::FFI::git_strarray_free($strarray);

Free a strarray (used by tag list, branch list iteration, etc.).

=head1 REVWALK

=head2 git_revwalk_new

    Git::Libgit2::FFI::git_revwalk_new(\my $walk, $repo);

Create a revision walker. Free with C<git_revwalk_free>.

=head2 git_revwalk_push

    Git::Libgit2::FFI::git_revwalk_push($walk, $oid_ptr);



( run in 1.151 second using v1.01-cache-2.11-cpan-8dfa8b56332 )