FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added getters · JohnnySheffield/nodegit@3111d39 · GitHub

Repository navigation

Commit 3111d39

Browse files
committed
Added getters
1 parent 7e5ee6e commit 3111d39

2 files changed

Lines changed: 262 additions & 105 deletions

File tree

‎include/commit.h‎

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,26 @@ class GitCommit : public ObjectWrap {
5858
static void ShaWork(uv_work_t* req);
5959
static void ShaAfterWork(uv_work_t* req);
6060

61+
static Handle<Value> Message(const Arguments& args);
62+
static void MessageWork(uv_work_t* req);
63+
static void MessageAfterWork(uv_work_t* req);
64+
65+
static Handle<Value> Time(const Arguments& args);
66+
static void TimeWork(uv_work_t* req);
67+
static void TimeAfterWork(uv_work_t* req);
68+
69+
static Handle<Value> Offset(const Arguments& args);
70+
static void OffsetWork(uv_work_t* req);
71+
static void OffsetAfterWork(uv_work_t* req);
72+
73+
static Handle<Value> Author(const Arguments& args);
74+
static void AuthorWork(uv_work_t* req);
75+
static void AuthorAfterWork(uv_work_t* req);
76+
77+
static Handle<Value> Committer(const Arguments& args);
78+
static void CommitterWork(uv_work_t* req);
79+
static void CommitterAfterWork(uv_work_t* req);
80+
6181
static Handle<Value> Tree(const Arguments& args);
6282
static void TreeWork(uv_work_t* req);
6383
static void TreeAfterWork(uv_work_t* req);
@@ -91,6 +111,43 @@ class GitCommit : public ObjectWrap {
91111
Persistent<Function> callback;
92112
};
93113

114+
struct MessageBaton {
115+
uv_work_t request;
116+
117+
git_commit* rawCommit;
118+
std::string message;
119+
120+
Persistent<Function> callback;
121+
};
122+
123+
struct TimeBaton {
124+
uv_work_t request;
125+
126+
git_commit* rawCommit;
127+
git_time_t time;
128+
129+
Persistent<Function> callback;
130+
};
131+
132+
struct SignatureBaton {
133+
uv_work_t request;
134+
135+
git_commit* rawCommit;
136+
git_signature* signature;
137+
138+
Persistent<Function> callback;
139+
};
140+
141+
struct OffsetBaton {
142+
uv_work_t request;
143+
144+
git_commit* rawCommit;
145+
int offset;
146+
147+
Persistent<Function> callback;
148+
};
149+
150+
94151
struct TreeBaton {
95152
uv_work_t request;
96153
const git_error* error;
@@ -101,11 +158,6 @@ class GitCommit : public ObjectWrap {
101158
Persistent<Function> callback;
102159
};
103160

104-
/**
105-
* Contains references to the current commit, parent commit (output)
106-
* parent commit's index, also contains references to an error code post
107-
* lookup, and a callback function to execute.
108-
*/
109161
struct ParentBaton {
110162
uv_work_t request;
111163
const git_error* error;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL