Files
codex/codex-rs/core/src
Ali TowaijiandGitHub 0cc3b50228 Fix recent_commits(limit=0) returning 1 commit instead of 0 (#7334)
Fixes #7333

This is a small bug fix.

This PR fixes an inconsistency in `recent_commits` where `limit == 0`
still returns 1 commit due to the use of `limit.max(1)` when
constructing the `git log -n` argument.

Expected behavior: requesting 0 commits should return an empty list.

This PR:
- returns an empty `Vec` when `limit == 0`
- adds a test for `recent_commits(limit == 0)` that fails before the
change and passes afterwards
- maintains existing behavior for `limit > 0`

This aligns behavior with API expectations and avoids downstream
consumers misinterpreting the repository as having commit history when
`limit == 0` is used to explicitly request none.

Happy to adjust if the current behavior is intentional.
2025-12-01 10:14:36 -08:00
..
2025-10-30 10:28:32 +00:00
2025-11-28 11:34:57 +00:00
2025-11-20 10:58:46 -08:00
2025-11-28 11:34:57 +00:00
2025-11-25 16:12:14 +00:00
2025-10-30 10:28:32 +00:00
2025-11-25 18:06:12 +00:00
2025-11-28 11:34:57 +00:00
2025-10-29 22:33:57 +00:00