Skip to content

Use Option for author and message in rebase_commit #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
signature should be optional in rebase_finish
  • Loading branch information
akhilkpdasan committed Jan 8, 2019
commit d54d1b2cf7460801b85b219cea2b7abfefe1cea0
5 changes: 3 additions & 2 deletions src/rebase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ impl <'repo> Rebase<'repo> {

/// Finishes a rebase that is currently in progress once all patches have
/// been applied.
pub fn finish(&mut self, signature: &Signature) -> Result<(), Error> {
pub fn finish(&mut self, signature: Option<&Signature>) -> Result<(), Error> {
unsafe {
try_call!(raw::git_rebase_finish(self.raw, signature.raw()));
try_call!(raw::git_rebase_finish(self.raw, signature.map(|s| s.raw())));
}

Ok(())
Expand Down Expand Up @@ -407,5 +407,6 @@ mod tests {
assert_eq!(commit.author().name(), Some("testname"));
assert_eq!(commit.author().email(), Some("testemail"));
}
rebase.finish(None).unwrap();
}
}