mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-30 13:51:53 +08:00
refactor: case-insensitive sorting
- `ToUpper` is not necessary to compare digit char with non-digit char - use numeric sorting for commit decorators with same type Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -26,7 +26,7 @@ namespace SourceGit.Models
|
||||
bool isDigit1 = char.IsDigit(c1);
|
||||
bool isDigit2 = char.IsDigit(c2);
|
||||
if (isDigit1 != isDigit2)
|
||||
return char.ToUpper(c1, CultureInfo.CurrentCulture).CompareTo(char.ToUpper(c2, CultureInfo.CurrentCulture));
|
||||
return c1.CompareTo(c2);
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user