forked from gitextensions/gitextensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommitData.cs
48 lines (43 loc) · 1.36 KB
/
CommitData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using GitUIPluginInterfaces;
using JetBrains.Annotations;
namespace GitCommands
{
public sealed class CommitData
{
public CommitData(
ObjectId objectId,
ObjectId treeGuid,
IReadOnlyList<ObjectId> parentGuids,
string author,
DateTime authorDate,
string committer,
DateTime commitDate,
string body)
{
ObjectId = objectId;
TreeGuid = treeGuid;
ParentGuids = parentGuids;
Author = author;
AuthorDate = authorDate.ToDateTimeOffset();
Committer = committer;
CommitDate = commitDate.ToDateTimeOffset();
Body = body;
}
public ObjectId ObjectId { get; }
public ObjectId TreeGuid { get; }
public IReadOnlyList<ObjectId> ParentGuids { get; }
public string Author { get; }
public DateTimeOffset AuthorDate { get; }
public string Committer { get; }
public DateTimeOffset CommitDate { get; }
// TODO mutable properties need review
[CanBeNull, ItemNotNull]
public IReadOnlyList<ObjectId> ChildIds { get; set; }
/// <summary>
/// Gets and sets the commit message.
/// </summary>
public string Body { get; set; }
}
}