Showing the changes to git-object/src/commit (1 of 4 files). Show all
Unified · Split
| @@ -65,6 +65,15 @@ impl<'a> CommitRefIter<'a> { · 64 unmodified lines | ||
| 65 | 65 | _ => None, |
| 66 | 66 | }) |
| 67 | 67 | } |
| 68 | + | |
| 69 | + /// Returns the committer signature if there is no decoding error. | |
| 70 | + /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not. | |
| 71 | + pub fn committer(&mut self) -> Option<git_actor::SignatureRef<'_>> { | |
| 72 | + self.find_map(|t| match t { | |
| 73 | + Ok(Token::Committer { signature }) => Some(signature), | |
| 74 | + _ => None, | |
| 75 | + }) | |
| 76 | + } | |
| 68 | 77 | } |
| 69 | 78 | |
| 70 | 79 | impl<'a> CommitRefIter<'a> { |