mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
optimize<User>: reduce memory used by commit's author/committer data
This commit is contained in:
parent
d9afb798db
commit
766f24f4b0
14 changed files with 91 additions and 41 deletions
|
@ -1,11 +1,18 @@
|
|||
using System;
|
||||
|
||||
namespace SourceGit.Models {
|
||||
/// <summary>
|
||||
/// 贮藏
|
||||
/// </summary>
|
||||
public class Stash {
|
||||
private static readonly DateTime UTC_START = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).ToLocalTime();
|
||||
|
||||
public string Name { get; set; } = "";
|
||||
public string SHA { get; set; } = "";
|
||||
public User Author { get; set; } = new User();
|
||||
public User Author { get; set; } = User.Invalid;
|
||||
public ulong Time { get; set; } = 0;
|
||||
public string Message { get; set; } = "";
|
||||
|
||||
public string TimeStr => UTC_START.AddSeconds(Time).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue