mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
refactor: commits only hold the end position of subject in body
This commit is contained in:
parent
064d04fccc
commit
b4e01a8b93
8 changed files with 27 additions and 41 deletions
|
@ -32,15 +32,12 @@ namespace SourceGit.Commands
|
|||
commit.AuthorTime = ulong.Parse(lines[4]);
|
||||
commit.Committer = Models.User.FindOrAdd(lines[5]);
|
||||
commit.CommitterTime = ulong.Parse(lines[6]);
|
||||
commit.Subject = lines[7];
|
||||
commit.SubjectLen = lines[7].Length;
|
||||
|
||||
if (lines.Length > 8)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 8; i < lines.Length; i++)
|
||||
builder.Append(lines[i]);
|
||||
commit.Message = builder.ToString();
|
||||
}
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 7; i < lines.Length; i++)
|
||||
builder.AppendLine(lines[i]);
|
||||
commit.Body = builder.ToString().TrimEnd();
|
||||
|
||||
return commit;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue