Open
Description
The libgit2 API says that author and message can be left NULL in git_rebase_commit
function to keep the original author and message Doc. However, in git2-rs the commit method on Rebase struct takes values instead of Options for author and message.
I ended up with something like this
while let Some(Ok(op)) = rebase.next() {
let commit = repo.find_commit(op.id())?;
let msg = commit.message().unwrap_or("");
let sig = commit.author();
rebase.commit(&sig, &sig, msg)?;
}
I couldn't get a for loop to work
for operation in rebase { //value moved here
let commit = repo.find_commit(operation?.id())?;
let sig = commit.author();
let msg = commit.message().unwrap_or("");
rebase.commit(&sig, &sig, msg)?; //value borrowed here after move
}
Metadata
Metadata
Assignees
Labels
No labels