Skip to content

Commit cc66afe

Browse files
committed
fix: ${files:N} will always be replaced with the first change path (#487)
* wrong loop index passed to `changes`
1 parent 5fef6e9 commit cc66afe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/CommitTemplate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public string Apply(List<Change> changes)
5555
{
5656
var count = Math.Min(int.Parse(countStr.Substring(1)), changes.Count);
5757
for (int j = 0; j < count; j++)
58-
paths.Add(changes[i].Path);
58+
paths.Add(changes[j].Path);
5959

6060
if (count < changes.Count)
6161
more = $" and {changes.Count - count} other files";

0 commit comments

Comments
 (0)