diff --git a/crates/core/src/git/repository/open/oreal.rs b/crates/core/src/git/repository/open/oreal.rs index 85d38aa..a7dd192 100644 --- a/crates/core/src/git/repository/open/oreal.rs +++ b/crates/core/src/git/repository/open/oreal.rs @@ -133,7 +133,7 @@ impl super::OpenRepositoryLike for RealOpenRepository { ) -> Result, git::commit::log::Error> { let limit = match find_commits.is_empty() { true => 1, - false => 50, + false => 25, }; self.0 .read() diff --git a/crates/core/src/git/repository/open/tests/commit_log.rs b/crates/core/src/git/repository/open/tests/commit_log.rs index fe3655e..b1f9bc5 100644 --- a/crates/core/src/git/repository/open/tests/commit_log.rs +++ b/crates/core/src/git/repository/open/tests/commit_log.rs @@ -19,18 +19,17 @@ fn should_return_single_item_in_commit_log_when_not_searching() -> TestResult { #[test] // assumes running in the git-next repo which should have main, next and dev as remote branches -fn should_return_capacity_50_in_commit_log_when_searching_for_garbage() -> TestResult { +fn should_return_capacity_25_in_commit_log_when_searching_for_garbage() -> TestResult { let_assert!(Ok(fs) = kxio::fs::temp()); let branch_name = given::a_branch_name(); let gitdir = GitDir::new(fs.base().to_path_buf(), StoragePathType::Internal); let test_repository = git::repository::test(fs.clone()); let_assert!(Ok(open_repository) = test_repository.open(&gitdir)); - for _ in [0; 60] { - // create 60 commits + for _ in [0; 25] { then::create_a_commit_on_branch(&fs, &gitdir, &branch_name)?; } let_assert!(Ok(result) = open_repository.commit_log(&branch_name, &[given::a_commit()])); - assert_eq!(result.len(), 50); + assert_eq!(result.len(), 25); Ok(()) }