Skip to content

Commit b528c2e

Browse files
committed
the daily commit (single handedly)
1 parent 988f905 commit b528c2e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

git-odb/src/loose/db/iter.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ pub enum Error {
1010

1111
/// Iteration and traversal
1212
impl Db {
13+
/// Return an iterator over all objects contained in the database.
14+
///
15+
/// The [`Id`][owned::Id]s returned by the iterator can typically be used in the [`locate(…)`][Db::locate()] method.
16+
/// _Note_ that the result is not sorted or stable, thus ordering can change between runs.
1317
pub fn iter(&self) -> impl Iterator<Item = Result<owned::Id, Error>> {
1418
use std::path::Component::Normal;
1519
WalkDir::new(&self.path)

git-odb/src/loose/db/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ pub struct Db {
99
impl Db {
1010
/// Initialize the Db with the `objects_directory` containing the hexadecimal first byte subdirectories, which in turn
1111
/// contain all loose objects.
12+
///
13+
/// In a git repository, this would be `.git/objects`.
1214
pub fn at(objects_directory: impl Into<PathBuf>) -> Db {
1315
Db {
1416
path: objects_directory.into(),

0 commit comments

Comments
 (0)