How to `git rebase --root` ?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 450
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
Hello, I a trying to implement an interactive rebase to modify all commit in a repository, including the first one.
The git cli provides the --root option to do so but I am having trouble translating this to git2-rs.
Reading at libgit2 doc I am still not sure what argument is expected to perform a "root" rebase ?
repository.rebase(
Some(&head), // Current branch
None, // No upstream to get all reachable commits
Some(&onto), // needs to be provided or we get the following error : "Error: invalid argument: 'upstream || onto'; class=Invalid (3)
"
None // No opt ?
)?;
Doing so on a repository containing only the first commit, I am not able to reach it.
Any hint ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the repository.rebase entry point and the libgit2 git_rebase_init documentation linked in the issue, then inspect how upstream, onto, and options are represented by git2-rs. Reproduce the case with a repository containing only its first commit and document or test the valid behavior for an interactive root rebase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100