Skip to content

Commit

Permalink
fix(config): set max of limit_commits to the number of commits (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsay-so authored Jan 22, 2023
1 parent 3715905 commit 06f6732
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-cliff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ fn process_repository<'a>(
args.exclude_path.clone(),
)?;
if let Some(commit_limit_value) = config.git.limit_commits {
commits = commits.drain(..commit_limit_value).collect();
commits = commits
.drain(..commits.len().min(commit_limit_value))
.collect();
}

// Update tags.
Expand Down

0 comments on commit 06f6732

Please sign in to comment.