git2-rs
git2-rs copied to clipboard
How to `git rebase --root` ?
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 ?