mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-22 13:51:15 +08:00
fix: sometimes %ct of branch returns empty string (#1715)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -94,8 +94,11 @@ namespace SourceGit.Commands
|
||||
branch.IsLocal = true;
|
||||
}
|
||||
|
||||
ulong committerDate = 0;
|
||||
ulong.TryParse(parts[1], out committerDate);
|
||||
|
||||
branch.FullName = refName;
|
||||
branch.CommitterDate = ulong.Parse(parts[1]);
|
||||
branch.CommitterDate = committerDate;
|
||||
branch.Head = parts[2];
|
||||
branch.IsCurrent = parts[3] == "*";
|
||||
branch.Upstream = parts[4];
|
||||
|
||||
@@ -34,13 +34,16 @@ namespace SourceGit.Commands
|
||||
if (!string.IsNullOrEmpty(message) && message.Equals(name, StringComparison.Ordinal))
|
||||
message = null;
|
||||
|
||||
ulong creactorDate = 0;
|
||||
ulong.TryParse(subs[5], out creactorDate);
|
||||
|
||||
tags.Add(new Models.Tag()
|
||||
{
|
||||
Name = name,
|
||||
IsAnnotated = subs[1].Equals("tag", StringComparison.Ordinal),
|
||||
SHA = string.IsNullOrEmpty(subs[3]) ? subs[2] : subs[3],
|
||||
Creator = Models.User.FindOrAdd(subs[4]),
|
||||
CreatorDate = string.IsNullOrEmpty(subs[5]) ? 0 : ulong.Parse(subs[5]),
|
||||
CreatorDate = creactorDate,
|
||||
Message = message,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user