History

Merge branch 'oknozor-feat/traversal-sort-by-committer-date'

Sebastian Thiel committed 4 years ago

Commit 6add3772 parents fda2a8d 5cf93234 files · +269 −85Browse files

Showing the changes to git-object/src/commit (1 of 4 files). Show all

Unified · Split

git-object/src/commit/ref_iter.rs+9−0
@@ -65,6 +65,15 @@ impl<'a> CommitRefIter<'a> { · 64 unmodified lines
65 _ => None,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
70impl<'a> CommitRefIter<'a> {79impl<'a> CommitRefIter<'a> {