Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
53 lines (41 loc) · 1.11 KB

File metadata and controls

executable file
·
53 lines (41 loc) · 1.11 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
49
50
51
52
53
/*
Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
*/
#ifndef REF_H
#define REF_H
#include <v8.h>
#include <node.h>
#include <node_events.h>
#include <string>
#include "../vendor/libgit2/include/git2.h"
#include "repo.h"
#include "oid.h"
using namespace node;
using namespace v8;
class GitReference : public EventEmitter {
public:
static Persistent<FunctionTemplate> constructor_template;
static void Initialize(Handle<v8::Object> target);
git_reference* GetValue();
void SetValue(git_reference* ref);
int Lookup(git_repository* repo, const char* name);
const git_oid* Oid();
protected:
GitReference() {}
~GitReference() {}
static Handle<Value> New(const Arguments& args);
static Handle<Value> Lookup(const Arguments& args);
static int EIO_Lookup(eio_req* req);
static int EIO_AfterLookup(eio_req* req);
static Handle<Value> Oid(const Arguments& args);
private:
git_reference *ref;
struct lookup_request {
GitReference* ref;
GitRepo* repo;
int err;
std::string name;
Persistent<Function> callback;
};
};
#endif
Morty Proxy This is a proxified and sanitized view of the page, visit original site.