Skip to content

Commit d54d1b2

Browse files
committed
signature should be optional in rebase_finish
1 parent bd04fa7 commit d54d1b2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rebase.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ impl <'repo> Rebase<'repo> {
174174

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

182182
Ok(())
@@ -407,5 +407,6 @@ mod tests {
407407
assert_eq!(commit.author().name(), Some("testname"));
408408
assert_eq!(commit.author().email(), Some("testemail"));
409409
}
410+
rebase.finish(None).unwrap();
410411
}
411412
}

0 commit comments

Comments
 (0)