From cc66afe5e251a0a2e49d43669ae3c5d9d80225ce Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 14 Oct 2024 15:31:29 +0800 Subject: [PATCH] fix: `${files:N}` will always be replaced with the first change path (#487) * wrong loop index passed to `changes` --- src/Models/CommitTemplate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/CommitTemplate.cs b/src/Models/CommitTemplate.cs index 57a88508..135d8ac9 100644 --- a/src/Models/CommitTemplate.cs +++ b/src/Models/CommitTemplate.cs @@ -55,7 +55,7 @@ namespace SourceGit.Models { var count = Math.Min(int.Parse(countStr.Substring(1)), changes.Count); for (int j = 0; j < count; j++) - paths.Add(changes[i].Path); + paths.Add(changes[j].Path); if (count < changes.Count) more = $" and {changes.Count - count} other files";