Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

implement Commit as HashObject too

  • Loading branch information...
commit a3fedd0fad423bf34c15b648bf9db977080d1b16 1 parent 3d6baa3
@hbons authored
Showing with 22 additions and 13 deletions.
  1. +22 −13 Objects.cs
View
35 Objects.cs
@@ -23,19 +23,6 @@
namespace Rainbows.Objects {
- public class Commit {
-
- public string Hash;
- public string ParentHash;
-
- public string UserName;
- public string UserEmail;
- public DateTime Timestamp;
-
- public Tree Tree;
- }
-
-
public abstract class HashObject {
public static string DatabasePath;
@@ -75,6 +62,28 @@ protected void WriteHashObject (string hash, byte [] buffer)
}
+ public class Commit : HashObject {
+
+ public string ParentHash;
+
+ public string UserName;
+ public string UserEmail;
+ public DateTime Timestamp;
+
+
+ public Commit (string hash) : base (hash)
+ {
+ }
+
+
+ public Tree Tree {
+ get {
+ return null;
+ }
+ }
+ }
+
+
public class Tree : HashObject {
public string Path;
Please sign in to comment.
Something went wrong with that request. Please try again.