mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-21 18:35:00 +00:00
minimize temporary strings for better performance
This commit is contained in:
parent
61a1b130f2
commit
979b8f9da6
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ namespace SourceGit.Commands
|
|||
if (dateEndIdx == -1)
|
||||
return;
|
||||
|
||||
var dateStr = line.Substring(0, dateEndIdx);
|
||||
var dateStr = line.AsSpan().Slice(0, dateEndIdx);
|
||||
if (double.TryParse(dateStr, out var date))
|
||||
statistics.AddCommit(line.Substring(dateEndIdx + 1), date);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue