Skip to content

Conversation

Keno
Copy link
Member

@Keno Keno commented Sep 30, 2025

Added Julia wrappers for three libgit2 functions:

  • GitDiff(::AbstractString): Parse diffs from unified diff format buffers
  • apply_to_tree(repo, preimage, diff, options): Apply a diff to a tree, returning a GitIndex with the result
  • write_tree_to!(repo, idx): Write an index as a tree to a repository

Made GitDiff and GitDiffStats repository-independent since they can be created from buffers and all operations work purely on object pointers. Added ApplyOptions struct for apply configuration and tests for all new functionality.

Written by Claude

…d git_index_write_tree_to

Added Julia wrappers for three libgit2 functions with idiomatic APIs:

- `GitDiff(::AbstractString)`: Parse diffs from unified diff format buffers
- `apply_to_tree(repo, preimage, diff, options)`: Apply a diff to a tree,
  returning a GitIndex with the result
- `write_tree_to!(repo, idx)`: Write an index as a tree to a repository

Made GitDiff and GitDiffStats repository-independent since they can be
created from buffers and all operations work purely on object pointers.
Added ApplyOptions struct for apply configuration and tests for all new
functionality.
@Keno Keno force-pushed the kf/git2wrappers branch from 738ee1a to cc9b1a1 Compare October 7, 2025 15:50
@Keno Keno added the merge me PR is reviewed. Merge when all tests are passing label Oct 7, 2025
@giordano giordano added the libgit2 The libgit2 library or the LibGit2 stdlib module label Oct 7, 2025
@Keno Keno merged commit 755bf41 into master Oct 8, 2025
7 of 9 checks passed
@Keno Keno deleted the kf/git2wrappers branch October 8, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module merge me PR is reviewed. Merge when all tests are passing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants