Revision history for Git-Libgit2

0.006     2026-08-11 03:38:31Z
  - Bind git_object_lookup_prefix for abbreviated-OID lookups. Export
    GIT_OID_MINPREFIXLEN (4). The len argument counts hex characters
    (nibbles), not raw bytes.
  - Bind git_libgit2_opts (variadic) for the (int, string) form used by
    GIT_OPT_SET_SEARCH_PATH, enabling programmatic config-search-path
    isolation. Export GIT_OPT_SET_SEARCH_PATH and the full
    GIT_CONFIG_LEVEL_* enum.
  - Export git_sort_t, git_direction, git_branch_t, git_filemode_t, and
    git_status_t constant groups so consumers stop redeclaring them
    locally (drift risk for GIT_ITEROVER / GIT_PASSTHROUGH and friends).
  - Add gitconfig isolation (GIT_CONFIG_GLOBAL / GIT_CONFIG_SYSTEM) to
    t/00-load.t, t/03-error.t, and t/torture-init.t to match the rest of
    the suite.
  - Bind git_index_find_prefix, so "is anything under this path tracked?"
    can be answered natively instead of by shelling out to git ls-files.
    The match is a string prefix, not a path prefix: a caller asking about
    a directory must supply the trailing slash itself.
  - Export GIT_OID_RAWSZ (20) and GIT_OID_HEXSZ (40), so consumers sizing
    their own git_oid buffers stop redeclaring the widths locally.
  - Correct the git_index_find documentation: it returns an error code
    (GIT_ENOTFOUND on a miss), not UINT_MAX, and the position lands in the
    out-param, which libgit2 leaves untouched on a miss — so the position
    is only meaningful when the return code is 0.
  - Fix three vacuous tests that passed a raw buffer address for a typed
    pointer out-param (size_t*, git_reference**). FFI::Platypus passes
    NULL rather than the address in that case, so the buffer kept its
    zeroed initialisation and the assertions could not fail. Pointer
    out-params need a scalar ref; only git_oid out-params typed as plain
    opaque take an address.
  - Give t/16-config.t and t/34-cherrypick-revert.t assertions that can
    fail. The config test checked `rc < 0 || rc == 0`, true for every
    value libgit2 can return; it now pins the documented refusal of
    git_config_get_string on a live handle and reads the value back over
    a snapshot. The cherrypick/revert test asserted in both branches of
    an if/else and never reached the success path — its scenario was
    unpickable (no parent to diff against, plus mainline=1 on a
    non-merge commit). It now builds a real two-branch history and
    asserts the merged index, the mainline misuse, and the working-tree
    effect of git_cherrypick.
  - Correct the cherrypick/revert documentation. The out-param of
    git_cherrypick_commit / git_revert_commit is a git_index handle the
    caller must free, not an OID, and neither function creates a commit
    despite the name — they compute the resulting index. The fifth
    argument is mainline (the parent to diff a merge against, 0 for an
    ordinary commit), not a parent count. git_cherrypick / git_revert
    do write to the index and working directory, so they need a
    checked-out working directory.

0.005     2026-08-09 20:03:21Z
  - Bind git_reference_create_matching for compare-and-swap direct reference
    updates that reject stale expected OIDs with GIT_EMODIFIED.
  - Fix the git_reference_create test to treat its out-param as an owned
    git_reference handle and free it, rather than misreading pointer bytes as
    an OID.
  - New closure type git_transport_certificate_check_cb, so callers can
    install a host-key / TLS certificate verification callback on remote
    fetch/push/connect.
  - Bind git_config_get_bool, so callers can read booleans with libgit2's
    own parsing rules instead of reimplementing them.
  - Git::Libgit2::Error now decodes the `klass` field of git_error (the
    git_error_t category) instead of always reporting 0.
  - Export the git_error_code constants (GIT_OK, GIT_ERROR, GIT_ENOTFOUND,
    GIT_EEXISTS, GIT_EAUTH, GIT_ECERTIFICATE, GIT_ENONFASTFORWARD, ... up
    to GIT_TIMEOUT) so callers can compare $err->code symbolically.

0.004     2026-05-27 17:06:23Z
  - Fix git_tag_create binding: the oid out-param is a caller-allocated
    git_oid buffer, so it must be declared 'opaque' (not 'opaque*') like
    the lightweight/from_buffer variants. The old declaration made every
    git_tag_create call fail with "failed to create tag annotation". The
    existing test only exercised git_tag_create_from_buffer, so it slipped
    through; t/13-tag.t now also covers git_tag_create directly.

0.003     2026-05-27 14:53:34Z
  - New binding git_repository_set_head: pin HEAD at a (possibly unborn)
    branch, e.g. to force 'main' on a freshly init'd repo regardless of the
    compiled-in default or ambient init.defaultBranch
  - Group A accessor/predicate complements:
    repository_head/head_unborn/head_detached,
    reference_symbolic_create/symbolic_target/symbolic_set_target/set_target/
    resolve/shorthand/is_branch/is_remote/is_tag,
    commit_id/time/time_offset/summary
  - Add TODO.md cataloguing the remaining unbound libgit2 1.5.1 surface
    (Group B: merge content-level, diff/patch text, index conflicts, stash
    iteration, branch upstream, typed config, remote management; Group C:
    blame, describe, submodule, worktree, notes, apply, attr/ignore,
    pathspec, mailmap) with per-family FFI gotchas
  - CI: pin the sibling Alien::Libgit2 install step to bash (the perl
    container falls back to dash, which lacks 'set -o pipefail')
  - Fix t/01 workdir comparison on macOS (resolve the /var -> /private/var
    symlink so it matches libgit2's canonical path)

0.002     2026-05-27 12:43:29Z
  - Update CI workflows to use the shared dzil-test composite action from
    [@Author::GETTY]; fixes missing Test::Pod by using listdeps --author
    in the sibling Alien::Libgit2 install step
  - Comprehensive POD pass: document every FFI function with =func, every
    Error method with =method, add section headers per group, add README.md
    with full function tables and architecture overview
  - Fix three POD transcription typos in FFI.pm (broken code examples in
    git_revwalk_hide_ref, git_credential_username_new, git_graph_ahead_behind)

0.001     2026-05-24 17:56:31Z
  - Initial release
  - Low-level FFI::Platypus bindings to libgit2 (via Alien::Libgit2)
  - Core: init/shutdown, version, error_last, repository_open_ext/free,
    config_open_default, reference_lookup/create/delete/iterator_new/name/target,
    oid_fromstr/tostr, blob_create_from_buffer/lookup/rawcontent/rawsize/free,
    treebuilder_new/insert/write/free, commit_create/lookup/tree/message/free,
    object_lookup/free
  - Remote + auth: remote_lookup/url/create/create_anonymous/connect/ls/disconnect,
    remote_fetch/push/init_callbacks, fetch_options_init, push_options_init,
    credential_userpass_plaintext_new/ssh_key_new/ssh_key_from_agent/
    default_new/username_new/free, git_credential_acquire_cb closure type
  - General-purpose: clone/clone_options_init, revwalk_* (new/push/push_head/
    push_ref/push_glob/push_range/hide*/next/sorting/reset/simplify_first_parent/free),
    branch_create/lookup/delete/iterator_new/next/iterator_free/name/is_head/move,
    tag_create/create_lightweight/lookup/delete/list/list_match/target/target_id/
    message/name/tagger/free,
    status_options_init/foreach/foreach_ext/file,
    diff_options_init/tree_to_tree/tree_to_workdir/tree_to_index/index_to_workdir/
    num_deltas/get_delta/free,
    repository_index/index_free, strarray_free
  - Tested against libgit2 1.5 (Debian Bookworm) and 1.9 (vendored share build)
