export all internal git functions by milahu · Pull Request #7296 · libgit2/libgit2 · GitHub
Skip to content

export all internal git functions#7296

Draft
milahu wants to merge 114 commits into
libgit2:mainfrom
milahu:export-all-git-functions
Draft

export all internal git functions#7296
milahu wants to merge 114 commits into
libgit2:mainfrom
milahu:export-all-git-functions

Conversation

@milahu

@milahu milahu commented Jun 14, 2026

Copy link
Copy Markdown

probably this will never get merged → draft PR

i needed some internal functions

git_iterator_for_tree
git_iterator_current
git_iterator_advance
git_iterator_free

to build a custom version of git_diff_tree_to_tree
for my git-file-times
where i dont need full tree diffs
but i only need to know "was this file added or modified or renamed"

so i exported all the internal git_* functions

in 8882239 i fixed a typecast for C++

seems to work... at least on linux
build is passing, tests are passing, downstream build is passing

edit: fixme:

In file included from /home/libgit2/source/tests/libgit2/apply/apply_helpers.c:1:
/home/libgit2/source/tests/libgit2/apply/apply_helpers.c: In function 'validate_index_unchanged':
/home/libgit2/source/tests/libgit2/apply/apply_helpers.c:92:21: error: implicit declaration of function 'git_repository_head_tree'; did you mean 'git_repository_oid_type'? [-Werror=implicit-function-declaration]
   92 |         cl_git_pass(git_repository_head_tree(&head, repo));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~

maybe caused by a broken include

@ethomson

Copy link
Copy Markdown
Member

@milahu

milahu commented Jun 26, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants