File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #ifndef GITLFS_H
2+ #define GITLFS_H
3+
4+ #include < nan.h>
5+ #include " context.h"
6+
7+ class GitLFS : public Nan ::ObjectWrap {
8+ public:
9+ GitLFS (const GitLFS &other) = delete ;
10+ GitLFS (GitLFS &&other) = delete ;
11+ GitLFS& operator =(const GitLFS &other) = delete ;
12+ GitLFS& operator =(GitLFS &&other) = delete ;
13+
14+ static void InitializeComponent (v8::Local<v8::Object> target, nodegit::Context *nodegitContext);
15+ };
16+
17+ #endif // GITLFS_H
Original file line number Diff line number Diff line change 1+ #include < nan.h>
2+ #include " ../include/nodegit.h"
3+ #include " ../include/context.h"
4+ #include " ../include/lfs.h"
5+
6+ using namespace v8 ;
7+
8+ void GitLFS::InitializeComponent (v8::Local<v8::Object> target, nodegit::Context *nodegitContext) {
9+ Nan::HandleScope scope;
10+
11+ v8::Local<Object> lfs = Nan::New<Object>();
12+
13+ Nan::Set (target, Nan::New<String>(" LFS" ).ToLocalChecked (), lfs);
14+ nodegitContext->SaveToPersistent (" LFS" , lfs);
15+ }
Original file line number Diff line number Diff line change 6868 "src/context.cc" ,
6969 "src/v8_helpers.cc" ,
7070 "src/tracker_wrap.cc" ,
71+ "src/lfs.cc" ,
7172 {% each % }
7273 {% if type != "enum" % }
7374 "src/{{ name }}.cc" ,
Original file line number Diff line number Diff line change 2323#include " ../include/convenient_patch.h"
2424#include " ../include/convenient_hunk.h"
2525#include " ../include/filter_registry.h"
26+ #include " ../include/lfs.h"
2627
2728using namespace v8 ;
2829
@@ -121,6 +122,7 @@ NAN_MODULE_INIT(init) {
121122 ConvenientHunk::InitializeComponent (target, nodegitContext);
122123 ConvenientPatch::InitializeComponent (target, nodegitContext);
123124 GitFilterRegistry::InitializeComponent (target, nodegitContext);
125+ GitLFS::InitializeComponent (target, nodegitContext);
124126
125127 nodegit::LockMaster::InitializeContext ();
126128}
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ require("./enums.js");
116116// Import extensions
117117// [Manual] extensions
118118importExtension ( "filter_registry" ) ;
119+ importExtension ( "lfs" ) ;
119120{ % each % }
120121 { % if type != "enum" % }
121122 importExtension ( "{{ filename }}" ) ;
You can’t perform that action at this time.
0 commit comments