Skip to content

Commit 7651f62

Browse files
committed
Add method for pushing Oids on an RefsReferringToIter
The `Oid`s will be pushed onto the underlying `Revwalk`.
1 parent 850d326 commit 7651f62

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/src/iter.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,15 @@ impl<'r> RefsReferringTo<'r> {
220220
Self { refs: HashMap::new(), inner: messages, current_refs: Vec::new() }
221221
}
222222

223+
/// Push a starting point for the iteration
224+
///
225+
/// The message will be pushed onto the underlying `Revwalk` used for
226+
/// iterating over messages.
227+
///
228+
pub fn push(&mut self, message: git2::Oid) -> Result<()> {
229+
self.inner.push(message).chain_err(|| EK::CannotConstructRevwalk)
230+
}
231+
223232
/// Start watching a reference
224233
///
225234
/// A watched reference may be returned by the iterator.

0 commit comments

Comments
 (0)