rust-lang / rust-lang/git2-rs

Support git_commit_create_cb in RebaseOptions

Open
#850 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.1k
Forks
450
Avg merge
11m
Merged PRs (30d)
1

Description

Currently, the RebaseOptions structure is missing support for commit_create_cb from the git_rebase_options C structure, which is used to facilitate things like commit signing in rebase operations. It would be useful to have safe access to this field to allow for custom commit signing abilities for rebase operations. It looks like the git_rebase_options structure has a payload field at the end which can be used for maintaining state across the FFI boundary, so implementation is hopefully not too complicated.

Followup discussion: signing_cb is also unimplemented, but marked as deprecated in the libgit2 C api. As such, it does not seem necessary to me to implement support for it. commit_create_cb seems to supersede its functionality.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Rust RebaseOptions type and its mapping to libgit2's git_rebase_options structure, then trace how callback state crosses the FFI boundary through payload. Compare the available commit_create_cb and deprecated signing_cb fields, and validate the behavior with the repository's rebase tests; done means safe access to commit_create_cb for custom signing during rebase operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
api, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.