Skip to content

Commit

Permalink
signature should be optional in rebase_finish
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilkpdasan committed Jan 8, 2019
1 parent bd04fa7 commit d54d1b2
Showing 1 changed file with 3 additions and 2 deletions.
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();
}
}

0 comments on commit d54d1b2

Please sign in to comment.