diff --git a/.gitignore b/.gitignore
index 3c15360fc..be86e88da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,9 @@
-# Files
-.DS_Store
-/sftp-config.json
+/build/*
+!/build/codegen/
-# Directories
-/build
-/example/stress/test
-/doc
-!doc/Theme.css
-/node_modules
-/testing.js
-/out
-/test.git
-/test/.reposCache
-.idea
+/doc/*
+!/doc/Theme.css
+
+/node_modules/
+/vendor/libgit2/
+/test/repos/
diff --git a/.travis.yml b/.travis.yml
index 1ebe30d0b..0604aaedf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,7 @@ language: node_js
node_js:
- 0.8
- "0.10"
+ - 0.11
git:
depth: 1
branches:
@@ -10,4 +11,4 @@ branches:
matrix:
fast_finish: true
allow_failures:
- - node_js: "0.11"
+ - node_js: 0.11
diff --git a/LICENSE b/LICENSE
index 80bc57cb1..8fe4c2f4c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2013 Tim Branyen
+Copyright (c) 2014 Tim Branyen
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/README.md b/README.md
index 98bddce54..e9affb8fc 100644
--- a/README.md
+++ b/README.md
@@ -1,117 +1,198 @@
-nodegit
-=======
+NodeGit
+-------
-> Node.js libgit2 bindings
+> Node bindings to the [libgit2](http://libgit2.github.com/) project.
-**v0.1.1** [](https://travis-ci.org/nodegit/nodegit)
+[](https://travis-ci.org/nodegit/nodegit)
+
+
+**Stable: 0.1.2**
Maintained by Tim Branyen [@tbranyen](http://twitter.com/tbranyen), Michael
-Robinson [@codeofinterest](http://twitter.com/codeofinterest), and Nick Kallen [@nk](http://twitter.com/nk), with help from
-[awesome
+Robinson [@codeofinterest](http://twitter.com/codeofinterest), and Nick Kallen
+[@nk](http://twitter.com/nk), with help from [awesome
contributors](https://github.com/tbranyen/nodegit/contributors)!
-API Documentation
-------------------------
+## API Documentation. ##
-Documentation may be found here: [`nodegit` documentation](http://www.nodegit.org/nodegit/).
+http://www.nodegit.org/nodegit/
-Building and installing
------------------------
+## Building and Installing. ##
-### Dependencies ###
+Minimum dependencies:
-To install `nodegit` you need `Node.js`, `python` and `cmake` (>=2.8).
+* [Python 2](https://www.python.org/)
+* [CMake >= 2.8](http://www.cmake.org/)
-### Easy install (Recommended) ###
-This will install and configure everything you need to use `nodegit`.
+``` bash
+npm install nodegit
+```
-```` bash
-$ npm run-script gen && npm install && npm test
-````
+### Building manually: ###
-### Mac OS X/Linux/Unix ###
+If you wish to help contribute to nodegit it is useful to build locally.
-#### Install `nodegit` by cloning source from GitHub and running `node install`: ####
+``` bash
+# Fetch this project.
+git clone git://github.com/tbranyen/nodegit.git
-```` bash
-# Install system dependencies
-$ brew install cmake libzip
-$ npm install -g node-gyp
-````
+# Enter the repository.
+cd nodegit
-```` bash
-$ git clone git://github.com/tbranyen/nodegit.git
-$ cd nodegit
-$ npm run-script gen && npm install
-````
+# Install the template engine, run the code generation script, and install.
+npm install ejs && npm run codegen && npm install
+```
-### Windows via Cygwin ###
+If you encounter errors, you most likely have not configured the dependencies
+correctly.
-#### `nodegit` has been compiled and tested to work with the setup required to build and run `Node.js` itself. ####
+### Installing dependencies: ###
-Instructions on compiling `Node.js` on a Windows platform can be found here:
-[https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows)](https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29)
+#### OS X ####
-API Example Usage
------------------
+Using Brew:
-Below are two examples. [There are several more](https://github.com/nodegit/nodegit/tree/master/example).
+``` bash
+brew install cmake libzip
+```
-### Git Log Emulation ###
+#### Linux ####
-```JavaScript
-var git = require('../'),
- path = require('path');
+Using APT in Ubuntu:
-git.Repo.open(path.resolve(__dirname, '/tmp/repo/.git'), function(error, repo) {
- if (error) throw error;
+``` bash
+sudo apt-get install cmake libzip-dev build-essential
+```
- repo.getMaster(function(error, branch) {
- if (error) throw error;
+Using Pacman in Arch Linux:
- // History returns an event.
- var history = branch.history();
+``` bash
+sudo pacman -S cmake libzip base-devel
+```
- // History emits 'commit' event for each commit in the branch's history
- history.on('commit', function(commit) {
- console.log('commit ' + commit.sha());
- console.log('Author:', commit.author().name() + ' <' + commit.author().email() + '>');
- console.log('Date:', commit.date());
- console.log('\n ' + commit.message());
- });
+#### Windows ####
- // Don't forget to call `start()`!
- history.start();
- });
-});
+For Windows users, you will have to install Visual Studio Express. You may
+have to add a build flag to the installation process to successfully install.
+Try first without, if the build fails, try again with the flag.
+
+*Allegedly the order in which you install Visual Studio could trigger this
+error.*
+
+- [Download and install CMake](http://www.cmake.org/cmake/resources/software.html).
+- [Download and install Python](https://www.python.org/download/windows)
+- [Download and install VS Express](http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop)
+``` bash
+npm install nodegit --msvs_version=2013
+# Or whatever version you've installed.
```
-### Clone a repo and read a file ###
+## API examples. ##
+
+### Cloning a repository and reading a file: ###
+
+``` javascript
+var clone = require("nodegit").Repo.clone;
-```JavaScript
-git.Repo.clone("https://github.com/nodegit/nodegit.git", path, null, function(error, repo) {
- if (error) throw error;
+// Clone a given repository into a specific folder.
+clone("https://github.com/nodegit/nodegit", "tmp", null, function(err, repo) {
+ if (err) {
+ throw err;
+ }
- repo.getCommit('59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5', function(error, commit) {
- if (error) throw error;
+ // Use a known commit sha from this repository.
+ var sha = "59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5";
- commit.getEntry('README.md', function(error, entry) {
- if (error) throw error;
+ // Look up this known commit.
+ repo.getCommit(sha, function(err, commit) {
+ if (err) {
+ throw error;
+ }
- entry.getBlob(function(error, blob) {
- if (error) throw error;
+ // Look up a specific file within that commit.
+ commit.getEntry("README.md", function(err, entry) {
+ if (err) {
+ throw error;
+ }
- console.log(entry.name(), entry.sha(), blob.size() + 'b');
- console.log('========================================================\n\n');
- var firstTenLines = blob.toString().split('\n').slice(0, 10).join('\n');
- console.log(firstTenLines);
- console.log('...');
+ // Get the blob contents from the file.
+ entry.getBlob(function(err, blob) {
+ if (err) {
+ throw err;
+ }
+
+ // Show the name, sha, and filesize in byes.
+ console.log(entry.name() + entry.sha() + blob.size() + "b");
+
+ // Show a spacer.
+ console.log(Array(72).join("=") + "\n\n");
+
+ // Show the entire file.
+ console.log(String(blob));
});
});
});
});
```
-[](http://githalytics.com/tbranyen/nodegit)
+### Emulating git log: ###
+
+``` javascript
+var open = require("nodegit").Repo.open;
+
+// Open the repository directory.
+open("tmp", function(err, repo) {
+ if (err) {
+ throw err;
+ }
+
+ // Open the master branch.
+ repo.getMaster(function(err, branch) {
+ if (err) {
+ throw err;
+ }
+
+ // Create a new history event emitter.
+ var history = branch.history();
+
+ // Create a counter to only show up to 9 entries.
+ var count = 0;
+
+ // Listen for commit events from the history.
+ history.on("commit", function(commit) {
+ // Disregard commits past 9.
+ if (++count >= 9) {
+ return;
+ }
+
+ // Show the commit sha.
+ console.log("commit " + commit.sha());
+
+ // Store the author object.
+ var author = commit.author();
+
+ // Display author information.
+ console.log("Author:\t" + author.name() + " <", author.email() + ">");
+
+ // Show the commit date.
+ console.log("Date:\t" + commit.date());
+
+ // Give some space and show the message.
+ console.log("\n " + commit.message());
+ });
+
+ // Start emitting events.
+ history.start();
+ });
+});
+```
+
+## Unit tests. ##
+
+You will need to build locally before running the tests. See above.
+
+``` bash
+npm test
+```
diff --git a/TODO b/TODO
deleted file mode 100644
index 34afdf82b..000000000
--- a/TODO
+++ /dev/null
@@ -1 +0,0 @@
-- codegen documentation
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 000000000..5dfc10162
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,36 @@
+# appveyor file
+# http://www.appveyor.com/docs/appveyor-yml
+project_id: "e5a5q75l9yfhnfv2"
+
+# build version format
+version: "{build}"
+
+# fix lineendings in Windows
+init:
+ - git config --global core.autocrlf input
+
+# what combinations to test
+environment:
+ matrix:
+ - nodejs_version: 0.11
+ - nodejs_version: 0.10
+ - nodejs_version: 0.8
+
+matrix:
+ allow_failures:
+ - nodejs_version: 0.11
+
+# Get the latest stable version of Node 0.STABLE.latest
+install:
+ - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
+ - cmd: SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%
+ - cmd: SET PATH=c:\python27;%PATH%
+ - cmd: npm install -g node-gyp
+ - npm install --msvs_version=2013
+
+test_script:
+ - node --version
+ - npm --version
+ - cmd: npm test
+
+build: off
diff --git a/binding.gyp b/binding.gyp
index 17d1dc5f3..6233c2826 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -1,70 +1,80 @@
{
- 'targets': [
- {
- 'target_name': 'nodegit',
- 'sources': [
- 'src/base.cc',
- 'src/blob.cc',
- 'src/commit.cc',
- 'src/oid.cc',
- 'src/reference.cc',
- 'src/object.cc',
- 'src/repo.cc',
- 'src/index.cc',
- 'src/index_entry.cc',
- 'src/index_time.cc',
- 'src/tag.cc',
- 'src/revwalk.cc',
- 'src/signature.cc',
- 'src/time.cc',
- 'src/tree.cc',
- 'src/tree_builder.cc',
- 'src/tree_entry.cc',
- 'src/diff_find_options.cc',
- 'src/diff_options.cc',
- 'src/diff_list.cc',
- 'src/patch.cc',
- 'src/delta.cc',
- 'src/diff_file.cc',
- 'src/diff_range.cc',
- 'src/threads.cc',
- 'src/wrapper.cc',
- 'src/refdb.cc',
- 'src/odb_object.cc',
- 'src/odb.cc',
- 'src/submodule.cc',
- 'src/remote.cc',
- 'src/clone_options.cc',
- 'src/functions/copy.cc',
+ "targets": [
+ {
+ "target_name": "nodegit",
- ],
+ "sources": [
+ "src/base.cc",
+ "src/blob.cc",
+ "src/commit.cc",
+ "src/oid.cc",
+ "src/reference.cc",
+ "src/object.cc",
+ "src/repo.cc",
+ "src/index.cc",
+ "src/index_entry.cc",
+ "src/index_time.cc",
+ "src/tag.cc",
+ "src/revwalk.cc",
+ "src/signature.cc",
+ "src/time.cc",
+ "src/tree.cc",
+ "src/tree_builder.cc",
+ "src/tree_entry.cc",
+ "src/diff_find_options.cc",
+ "src/diff_options.cc",
+ "src/diff_list.cc",
+ "src/patch.cc",
+ "src/delta.cc",
+ "src/diff_file.cc",
+ "src/diff_range.cc",
+ "src/threads.cc",
+ "src/wrapper.cc",
+ "src/refdb.cc",
+ "src/odb_object.cc",
+ "src/odb.cc",
+ "src/submodule.cc",
+ "src/remote.cc",
+ "src/clone_options.cc",
+ "src/functions/copy.cc",
+ ],
- 'include_dirs': [
- 'vendor/libv8-convert',
- 'vendor/libgit2/include',
- "::Initialize(Handle target) {
-%>
<% if (functionInfo.isAsync) { -%>
-<% include templates/asyncFunction.cc.ejs -%>
+<% include build/codegen/templates/asyncFunction.cc.ejs -%>
<% } else { -%>
-<% include templates/syncFunction.cc.ejs -%>
+<% include build/codegen/templates/syncFunction.cc.ejs -%>
<% } -%>
<% } -%>
<% } -%>
-<% include templates/fields.cc.ejs -%>
+<% include build/codegen/templates/fields.cc.ejs -%>
<% if (typeof cType != 'undefined') { -%>
Persistent <%- cppClassName %>::constructor_template;
diff --git a/templates/convertFromV8.cc.ejs b/build/codegen/templates/convertFromV8.cc.ejs
similarity index 90%
rename from templates/convertFromV8.cc.ejs
rename to build/codegen/templates/convertFromV8.cc.ejs
index 58f238533..d1a442e34 100644
--- a/templates/convertFromV8.cc.ejs
+++ b/build/codegen/templates/convertFromV8.cc.ejs
@@ -20,7 +20,7 @@
<% } else if (arg.cppClassName == 'Buffer') { -%>
from_<%- arg.name %> = Buffer::Data(args[<%- jsArg %>]->ToObject());
<% } else if (isV8Value(arg.cppClassName)) { -%>
- from_<%- arg.name %> = (<%- arg.cType %>) args[<%- jsArg %>]->To<%- arg.cppClassName %>()->Value();
+ from_<%- arg.name %> = (<%- arg.cType %>) <%- arg.additionalCast %> <%- arg.cast %> args[<%- jsArg %>]->To<%- arg.cppClassName %>()->Value();
<% } else { -%>
from_<%- arg.name %> = ObjectWrap::Unwrap<<%- arg.cppClassName %>>(args[<%- jsArg %>]->ToObject())->GetValue();
<% } -%>
@@ -29,4 +29,4 @@
from_<%- arg.name %> = 0;
}
<% } -%>
-<% } -%>
\ No newline at end of file
+<% } -%>
diff --git a/templates/convertToV8.cc.ejs b/build/codegen/templates/convertToV8.cc.ejs
similarity index 100%
rename from templates/convertToV8.cc.ejs
rename to build/codegen/templates/convertToV8.cc.ejs
diff --git a/templates/doc.cc.ejs b/build/codegen/templates/doc.cc.ejs
similarity index 100%
rename from templates/doc.cc.ejs
rename to build/codegen/templates/doc.cc.ejs
diff --git a/templates/fields.cc.ejs b/build/codegen/templates/fields.cc.ejs
similarity index 100%
rename from templates/fields.cc.ejs
rename to build/codegen/templates/fields.cc.ejs
diff --git a/templates/guardArguments.cc.ejs b/build/codegen/templates/guardArguments.cc.ejs
similarity index 100%
rename from templates/guardArguments.cc.ejs
rename to build/codegen/templates/guardArguments.cc.ejs
diff --git a/templates/header.h.ejs b/build/codegen/templates/header.h.ejs
similarity index 100%
rename from templates/header.h.ejs
rename to build/codegen/templates/header.h.ejs
diff --git a/templates/syncFunction.cc.ejs b/build/codegen/templates/syncFunction.cc.ejs
similarity index 100%
rename from templates/syncFunction.cc.ejs
rename to build/codegen/templates/syncFunction.cc.ejs
diff --git a/v0.18.0.json b/build/codegen/v0.18.0.json
similarity index 99%
rename from v0.18.0.json
rename to build/codegen/v0.18.0.json
index 58127837d..1671d2a81 100644
--- a/v0.18.0.json
+++ b/build/codegen/v0.18.0.json
@@ -10380,7 +10380,8 @@
"cType": "git_direction",
"cppClassName": "Number",
"jsClassName": "Number",
- "comment": "GIT_DIRECTION_FETCH if you want to fetch or GIT_DIRECTION_PUSH if you want to push"
+ "comment": "GIT_DIRECTION_FETCH if you want to fetch or GIT_DIRECTION_PUSH if you want to push",
+ "additionalCast": "(int)"
}
],
"isAsync": true,
@@ -17283,7 +17284,8 @@
"cType": "git_filemode_t",
"cppClassName": "Number",
"jsClassName": "Number",
- "comment": "Folder attributes of the entry. This parameter must be valued with one of the following entries: 0040000, 0100644, 0100755, 0120000 or 0160000."
+ "comment": "Folder attributes of the entry. This parameter must be valued with one of the following entries: 0040000, 0100644, 0100755, 0120000 or 0160000.",
+ "additionalCast": "(int)"
}
],
"isAsync": false,
diff --git a/example/apps/git_profanity_check.js b/example/apps/git_profanity_check.js
index 618eb7a66..7f0674849 100644
--- a/example/apps/git_profanity_check.js
+++ b/example/apps/git_profanity_check.js
@@ -1,40 +1,66 @@
#!/usr/bin/env node
+// vim: ft=javascript
-// Copyright 2011, Tim Branyen @tbranyen
+// Copyright 2011-2014, Tim Branyen @tbranyen
// Dual licensed under the MIT and GPL licenses.
-// Script to detect cursewords in commit messages and provide the
-// offending commit sha's.
-// vim: ft=javascript
+// Script to detect cursewords in commit messages and provide the offending
+// commit sha's.
+//
+// Usage:
+//
+// node git_profanity_check some/repo/.git
+//
var git = require('../../');
-var curses = ['add', 'swears', 'here'],
- path = '../../.git',
- branchName = 'master',
- reCurse = new RegExp('\\b(?:' + curses.join('|') + ')\\b', 'gi');
-
+var curses = ['put', 'curse', 'words', 'here'];
+var path = './.git';
+var branch = 'master';
+var reCurse = new RegExp('\\b(?:' + curses.join('|') + ')\\b', 'gi');
+// Default path is `.git`.
if (process.argv.length < 3) {
- console.log('No git path passed as argument, defaulting to ./.git');
-} else {
+ console.log('No path passed as argument, defaulting to .git.');
+}
+// Otherwise defaults.
+else {
path = process.argv[2];
+ // Set repo branch
if (process.argv.length < 4) {
- console.log('No repo branchName passed as argument, defaulting to master');
- } else {
- branchName = process.argv[3];
+ console.log('No branch passed as argument, defaulting to master.');
+ }
+ else {
+ branch = process.argv[3];
}
}
-git.Repo.open(path, function(error, repo) {
- if (error) throw error;
+// Open repository.
+git.Repo.open(path, function(err, repo) {
+ if (err) {
+ throw new Error(err);
+ }
- repo.getBranch(branchName, function(error, branch) {
- if (error) throw error;
+ // Open branch, default to master.
+ repo.getBranch(branch, function(err, branch) {
+ if (err) {
+ throw new Error(err);
+ }
+ // Iterate history
var history = branch.history();
+
+ // Iterate over every commit message and test for words.
history.on('commit', function(commit) {
- if (reCurse.test(commit.message()))
- console.log('Curse detected in commit', commit.sha(), 'message', commit.message());
- }).start();
+ var message = commit.message();
+
+ if (reCurse.test(message)) {
+ console.log('Curse detected in commit', commit.sha());
+ console.log('=> ', message);
+ return;
+ }
+ });
+
+ // Start history iteration.
+ history.start();
});
});
diff --git a/gen.js b/gen.js
deleted file mode 100644
index d05c6d7ad..000000000
--- a/gen.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var fs = require('fs'),
- ejs = require('ejs'),
- path = require('path');
-
-var idefs = JSON.parse(fs.readFileSync('v0.18.0.json')),
- classTemplate = ejs.compile(fs.readFileSync(path.resolve("./templates/class.cc.ejs")).toString(), {filename: 'class.cc'}),
- headerTemplate = ejs.compile(fs.readFileSync(path.resolve("./templates/header.h.ejs")).toString(), {filename: 'header.h'});
-
-for (var i in idefs) {
- var idef = idefs[i];
- if (idef.ignore) continue;
-
- fs.writeFileSync(
- path.resolve("./include/" + idef.filename), headerTemplate(idef));
- fs.writeFileSync(
- path.resolve("./src/" + path.basename(idef.filename, '.h') + '.cc'), classTemplate(idef));
-}
diff --git a/include/blob.h b/include/blob.h
index 94f3537bd..561338354 100755
--- a/include/blob.h
+++ b/include/blob.h
@@ -8,7 +8,6 @@
#include
#include
#include
-#include "nan.h"
#include "git2.h"
@@ -18,7 +17,7 @@ using namespace v8;
class GitBlob : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_blob *GetValue();
@@ -29,12 +28,13 @@ class GitBlob : public ObjectWrap {
GitBlob(git_blob *raw);
~GitBlob();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
- static NAN_METHOD(Oid);
- static NAN_METHOD(Content);
- static NAN_METHOD(Size);
- static NAN_METHOD(IsBinary);
+
+ static Handle Oid(const Arguments& args);
+ static Handle Content(const Arguments& args);
+ static Handle Size(const Arguments& args);
+ static Handle IsBinary(const Arguments& args);
git_blob *raw;
};
diff --git a/include/branch.h b/include/branch.h
index 67b4eb373..bfbf9bcdb 100644
--- a/include/branch.h
+++ b/include/branch.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class Branch : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_branch *GetValue();
@@ -30,19 +28,20 @@ class Branch : public ObjectWrap {
Branch(git_branch *raw);
~Branch();
- static NAN_METHOD(New);
-
- static NAN_METHOD(Create);
- static NAN_METHOD(Delete);
- static NAN_METHOD(Foreach);
- static NAN_METHOD(Move);
- static NAN_METHOD(Lookup);
- static NAN_METHOD(Name);
- static NAN_METHOD(Upstream);
- static NAN_METHOD(SetUpstream);
- static NAN_METHOD(UpstreamName);
- static NAN_METHOD(IsHead);
- static NAN_METHOD(RemoteName);
+ static Handle New(const Arguments& args);
+
+
+ static Handle Create(const Arguments& args);
+ static Handle Delete(const Arguments& args);
+ static Handle Foreach(const Arguments& args);
+ static Handle Move(const Arguments& args);
+ static Handle Lookup(const Arguments& args);
+ static Handle Name(const Arguments& args);
+ static Handle Upstream(const Arguments& args);
+ static Handle SetUpstream(const Arguments& args);
+ static Handle UpstreamName(const Arguments& args);
+ static Handle IsHead(const Arguments& args);
+ static Handle RemoteName(const Arguments& args);
git_branch *raw;
};
diff --git a/include/clone_options.h b/include/clone_options.h
index 42db7e0c8..14da5daad 100644
--- a/include/clone_options.h
+++ b/include/clone_options.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitCloneOptions : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_clone_options *GetValue();
@@ -30,7 +28,8 @@ class GitCloneOptions : public ObjectWrap {
GitCloneOptions(git_clone_options *raw);
~GitCloneOptions();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
+
git_clone_options *raw;
};
diff --git a/include/commit.h b/include/commit.h
index a02ed9f77..6f69f5889 100755
--- a/include/commit.h
+++ b/include/commit.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitCommit : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_commit *GetValue();
@@ -30,19 +28,20 @@ class GitCommit : public ObjectWrap {
GitCommit(git_commit *raw);
~GitCommit();
- static NAN_METHOD(New);
-
- static NAN_METHOD(Oid);
- static NAN_METHOD(MessageEncoding);
- static NAN_METHOD(Message);
- static NAN_METHOD(Time);
- static NAN_METHOD(Offset);
- static NAN_METHOD(Committer);
- static NAN_METHOD(Author);
- static NAN_METHOD(TreeId);
- static NAN_METHOD(ParentCount);
- static NAN_METHOD(ParentId);
- static NAN_METHOD(NthGenAncestor);
+ static Handle New(const Arguments& args);
+
+
+ static Handle Oid(const Arguments& args);
+ static Handle MessageEncoding(const Arguments& args);
+ static Handle Message(const Arguments& args);
+ static Handle Time(const Arguments& args);
+ static Handle Offset(const Arguments& args);
+ static Handle Committer(const Arguments& args);
+ static Handle Author(const Arguments& args);
+ static Handle TreeId(const Arguments& args);
+ static Handle ParentCount(const Arguments& args);
+ static Handle ParentId(const Arguments& args);
+ static Handle NthGenAncestor(const Arguments& args);
git_commit *raw;
};
diff --git a/include/delta.h b/include/delta.h
index d46511b9c..e06f6283c 100644
--- a/include/delta.h
+++ b/include/delta.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitDelta : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_diff_delta *GetValue();
@@ -30,13 +28,13 @@ class GitDelta : public ObjectWrap {
GitDelta(git_diff_delta *raw);
~GitDelta();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
- static NAN_METHOD(OldFile);
- static NAN_METHOD(NewFile);
- static NAN_METHOD(Status);
- static NAN_METHOD(Similarity);
- static NAN_METHOD(Flags);
+ static Handle OldFile(const Arguments& args);
+ static Handle NewFile(const Arguments& args);
+ static Handle Status(const Arguments& args);
+ static Handle Similarity(const Arguments& args);
+ static Handle Flags(const Arguments& args);
git_diff_delta *raw;
};
diff --git a/include/diff_file.h b/include/diff_file.h
index adb50ab42..f7f8210d0 100644
--- a/include/diff_file.h
+++ b/include/diff_file.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitDiffFile : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_diff_file *GetValue();
@@ -30,13 +28,13 @@ class GitDiffFile : public ObjectWrap {
GitDiffFile(git_diff_file *raw);
~GitDiffFile();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
- static NAN_METHOD(Oid);
- static NAN_METHOD(Path);
- static NAN_METHOD(Size);
- static NAN_METHOD(Flags);
- static NAN_METHOD(Mode);
+ static Handle Oid(const Arguments& args);
+ static Handle Path(const Arguments& args);
+ static Handle Size(const Arguments& args);
+ static Handle Flags(const Arguments& args);
+ static Handle Mode(const Arguments& args);
git_diff_file *raw;
};
diff --git a/include/diff_find_options.h b/include/diff_find_options.h
index d76efe975..3500d1b23 100644
--- a/include/diff_find_options.h
+++ b/include/diff_find_options.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitDiffFindOptions : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_diff_find_options *GetValue();
@@ -30,7 +28,8 @@ class GitDiffFindOptions : public ObjectWrap {
GitDiffFindOptions(git_diff_find_options *raw);
~GitDiffFindOptions();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
+
git_diff_find_options *raw;
};
diff --git a/include/diff_list.h b/include/diff_list.h
index 04c604766..185a00e56 100644
--- a/include/diff_list.h
+++ b/include/diff_list.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitDiffList : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_diff_list *GetValue();
@@ -29,15 +27,15 @@ class GitDiffList : public ObjectWrap {
private:
GitDiffList(git_diff_list *raw);
~GitDiffList();
-
- static NAN_METHOD(New);
-
- static NAN_METHOD(Merge);
- static NAN_METHOD(FindSimilar);
- static NAN_METHOD(Size);
- static NAN_METHOD(NumDeltasOfType);
- static NAN_METHOD(Patch);
+ static Handle New(const Arguments& args);
+
+
+ static Handle Merge(const Arguments& args);
+ static Handle FindSimilar(const Arguments& args);
+ static Handle Size(const Arguments& args);
+ static Handle NumDeltasOfType(const Arguments& args);
+ static Handle Patch(const Arguments& args);
git_diff_list *raw;
};
diff --git a/include/diff_options.h b/include/diff_options.h
index 292269763..6dd93a0b8 100644
--- a/include/diff_options.h
+++ b/include/diff_options.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitDiffOptions : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_diff_options *GetValue();
@@ -30,7 +28,8 @@ class GitDiffOptions : public ObjectWrap {
GitDiffOptions(git_diff_options *raw);
~GitDiffOptions();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
+
git_diff_options *raw;
};
diff --git a/include/diff_range.h b/include/diff_range.h
index 7df5b8042..bb44337b4 100644
--- a/include/diff_range.h
+++ b/include/diff_range.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitDiffRange : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_diff_range *GetValue();
@@ -30,12 +28,12 @@ class GitDiffRange : public ObjectWrap {
GitDiffRange(git_diff_range *raw);
~GitDiffRange();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
- static NAN_METHOD(OldStart);
- static NAN_METHOD(OldLines);
- static NAN_METHOD(NewStart);
- static NAN_METHOD(NewLines);
+ static Handle OldStart(const Arguments& args);
+ static Handle OldLines(const Arguments& args);
+ static Handle NewStart(const Arguments& args);
+ static Handle NewLines(const Arguments& args);
git_diff_range *raw;
};
diff --git a/include/index.h b/include/index.h
index 4edafefec..e634d7ea0 100755
--- a/include/index.h
+++ b/include/index.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitIndex : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_index *GetValue();
@@ -30,9 +28,10 @@ class GitIndex : public ObjectWrap {
GitIndex(git_index *raw);
~GitIndex();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
+
- static NAN_METHOD(Open);
+ static Handle Open(const Arguments& args);
static void OpenWork(uv_work_t* req);
static void OpenAfterWork(uv_work_t* req);
@@ -45,7 +44,7 @@ class GitIndex : public ObjectWrap {
const char * index_path;
Persistent callback;
};
- static NAN_METHOD(Read);
+ static Handle Read(const Arguments& args);
static void ReadWork(uv_work_t* req);
static void ReadAfterWork(uv_work_t* req);
@@ -57,7 +56,7 @@ class GitIndex : public ObjectWrap {
git_index * index;
Persistent callback;
};
- static NAN_METHOD(Write);
+ static Handle Write(const Arguments& args);
static void WriteWork(uv_work_t* req);
static void WriteAfterWork(uv_work_t* req);
@@ -69,7 +68,7 @@ class GitIndex : public ObjectWrap {
git_index * index;
Persistent callback;
};
- static NAN_METHOD(ReadTree);
+ static Handle ReadTree(const Arguments& args);
static void ReadTreeWork(uv_work_t* req);
static void ReadTreeAfterWork(uv_work_t* req);
@@ -83,7 +82,7 @@ class GitIndex : public ObjectWrap {
const git_tree * tree;
Persistent callback;
};
- static NAN_METHOD(WriteTree);
+ static Handle WriteTree(const Arguments& args);
static void WriteTreeWork(uv_work_t* req);
static void WriteTreeAfterWork(uv_work_t* req);
@@ -96,12 +95,12 @@ class GitIndex : public ObjectWrap {
git_index * index;
Persistent callback;
};
- static NAN_METHOD(Size);
- static NAN_METHOD(Clear);
- static NAN_METHOD(Entry);
- static NAN_METHOD(Remove);
- static NAN_METHOD(RemoveDirectory);
- static NAN_METHOD(AddBypath);
+ static Handle Size(const Arguments& args);
+ static Handle Clear(const Arguments& args);
+ static Handle Entry(const Arguments& args);
+ static Handle Remove(const Arguments& args);
+ static Handle RemoveDirectory(const Arguments& args);
+ static Handle AddBypath(const Arguments& args);
static void AddBypathWork(uv_work_t* req);
static void AddBypathAfterWork(uv_work_t* req);
@@ -115,12 +114,12 @@ class GitIndex : public ObjectWrap {
const char * path;
Persistent callback;
};
- static NAN_METHOD(RemoveBypath);
- static NAN_METHOD(Find);
- static NAN_METHOD(ConflictRemove);
- static NAN_METHOD(ConflictCleanup);
- static NAN_METHOD(HasConflicts);
- static NAN_METHOD(IndexToWorkdir);
+ static Handle RemoveBypath(const Arguments& args);
+ static Handle Find(const Arguments& args);
+ static Handle ConflictRemove(const Arguments& args);
+ static Handle ConflictCleanup(const Arguments& args);
+ static Handle HasConflicts(const Arguments& args);
+ static Handle IndexToWorkdir(const Arguments& args);
static void IndexToWorkdirWork(uv_work_t* req);
static void IndexToWorkdirAfterWork(uv_work_t* req);
diff --git a/include/index_entry.h b/include/index_entry.h
index 8e3ea5072..7bf5fc6a8 100644
--- a/include/index_entry.h
+++ b/include/index_entry.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitIndexEntry : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_index_entry *GetValue();
@@ -30,21 +28,21 @@ class GitIndexEntry : public ObjectWrap {
GitIndexEntry(git_index_entry *raw);
~GitIndexEntry();
- static NAN_METHOD(New);
-
- static NAN_METHOD(Ctime);
- static NAN_METHOD(Mtime);
- static NAN_METHOD(Dev);
- static NAN_METHOD(Ino);
- static NAN_METHOD(Mode);
- static NAN_METHOD(Uid);
- static NAN_METHOD(gid);
- static NAN_METHOD(FileSize);
- static NAN_METHOD(Oid);
- static NAN_METHOD(Flags);
- static NAN_METHOD(FlagsExtended);
- static NAN_METHOD(Path);
-
+ static Handle New(const Arguments& args);
+
+ static Handle Ctime(const Arguments& args);
+ static Handle Mtime(const Arguments& args);
+ static Handle Dev(const Arguments& args);
+ static Handle Ino(const Arguments& args);
+ static Handle Mode(const Arguments& args);
+ static Handle Uid(const Arguments& args);
+ static Handle gid(const Arguments& args);
+ static Handle FileSize(const Arguments& args);
+ static Handle Oid(const Arguments& args);
+ static Handle Flags(const Arguments& args);
+ static Handle FlagsExtended(const Arguments& args);
+ static Handle Path(const Arguments& args);
+
git_index_entry *raw;
};
diff --git a/include/index_time.h b/include/index_time.h
index ad8dc49a5..765ce6cc7 100644
--- a/include/index_time.h
+++ b/include/index_time.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitIndexTime : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_index_time *GetValue();
@@ -30,10 +28,11 @@ class GitIndexTime : public ObjectWrap {
GitIndexTime(git_index_time *raw);
~GitIndexTime();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
+
+ static Handle Seconds(const Arguments& args);
+ static Handle Nanoseconds(const Arguments& args);
- static NAN_METHOD(Seconds);
- static NAN_METHOD(Nanoseconds);
git_index_time *raw;
};
diff --git a/include/object.h b/include/object.h
index e4188ed83..6ab9d3537 100644
--- a/include/object.h
+++ b/include/object.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitObject : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_object *GetValue();
@@ -30,12 +28,12 @@ class GitObject : public ObjectWrap {
GitObject(git_object *raw);
~GitObject();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
- static NAN_METHOD(Oid);
- static NAN_METHOD(Type);
- static NAN_METHOD(Peel);
+ static Handle Oid(const Arguments& args);
+ static Handle Type(const Arguments& args);
+ static Handle Peel(const Arguments& args);
static void PeelWork(uv_work_t* req);
static void PeelAfterWork(uv_work_t* req);
diff --git a/include/odb.h b/include/odb.h
index 5dbde3946..6ed9913d9 100644
--- a/include/odb.h
+++ b/include/odb.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitOdb : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_odb *GetValue();
@@ -30,13 +28,13 @@ class GitOdb : public ObjectWrap {
GitOdb(git_odb *raw);
~GitOdb();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
- static NAN_METHOD(Create);
- static NAN_METHOD(Open);
- static NAN_METHOD(AddDiskAlternate);
- static NAN_METHOD(Read);
+ static Handle Create(const Arguments& args);
+ static Handle Open(const Arguments& args);
+ static Handle AddDiskAlternate(const Arguments& args);
+ static Handle Read(const Arguments& args);
static void ReadWork(uv_work_t* req);
static void ReadAfterWork(uv_work_t* req);
@@ -51,11 +49,11 @@ class GitOdb : public ObjectWrap {
const git_oid * id;
Persistent callback;
};
- static NAN_METHOD(ReadPrefix);
- static NAN_METHOD(ReadHeader);
- static NAN_METHOD(Exists);
- static NAN_METHOD(Refresh);
- static NAN_METHOD(Write);
+ static Handle ReadPrefix(const Arguments& args);
+ static Handle ReadHeader(const Arguments& args);
+ static Handle Exists(const Arguments& args);
+ static Handle Refresh(const Arguments& args);
+ static Handle Write(const Arguments& args);
static void WriteWork(uv_work_t* req);
static void WriteAfterWork(uv_work_t* req);
@@ -74,8 +72,8 @@ class GitOdb : public ObjectWrap {
git_otype type;
Persistent callback;
};
- static NAN_METHOD(Hash);
- static NAN_METHOD(Hashfile);
+ static Handle Hash(const Arguments& args);
+ static Handle Hashfile(const Arguments& args);
git_odb *raw;
};
diff --git a/include/odb_object.h b/include/odb_object.h
index 54325a1fe..7938dfa49 100644
--- a/include/odb_object.h
+++ b/include/odb_object.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitOdbObject : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_odb_object *GetValue();
@@ -30,12 +28,13 @@ class GitOdbObject : public ObjectWrap {
GitOdbObject(git_odb_object *raw);
~GitOdbObject();
- static NAN_METHOD(New);
-
- static NAN_METHOD(Data);
- static NAN_METHOD(Size);
- static NAN_METHOD(Type);
- static NAN_METHOD(Oid);
+ static Handle New(const Arguments& args);
+
+
+ static Handle Data(const Arguments& args);
+ static Handle Size(const Arguments& args);
+ static Handle Type(const Arguments& args);
+ static Handle Oid(const Arguments& args);
git_odb_object *raw;
};
diff --git a/include/oid.h b/include/oid.h
index 789b560ea..2ce3a9e5c 100755
--- a/include/oid.h
+++ b/include/oid.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitOid : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_oid *GetValue();
@@ -30,11 +28,11 @@ class GitOid : public ObjectWrap {
GitOid(git_oid *raw);
~GitOid();
- static NAN_METHOD(New);
-
- static NAN_METHOD(FromString);
- static NAN_METHOD(Sha);
-
+ static Handle New(const Arguments& args);
+
+
+ static Handle FromString(const Arguments& args);
+ static Handle Sha(const Arguments& args);
git_oid *raw;
};
diff --git a/include/patch.h b/include/patch.h
index e5f445b41..7a4d408ff 100644
--- a/include/patch.h
+++ b/include/patch.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitPatch : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_diff_patch *GetValue();
@@ -30,15 +28,16 @@ class GitPatch : public ObjectWrap {
GitPatch(git_diff_patch *raw);
~GitPatch();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
+
- static NAN_METHOD(Delta);
- static NAN_METHOD(Size);
- static NAN_METHOD(Stats);
- static NAN_METHOD(Hunk);
- static NAN_METHOD(Lines);
- static NAN_METHOD(Line);
- static NAN_METHOD(ToString);
+ static Handle Delta(const Arguments& args);
+ static Handle Size(const Arguments& args);
+ static Handle Stats(const Arguments& args);
+ static Handle Hunk(const Arguments& args);
+ static Handle Lines(const Arguments& args);
+ static Handle Line(const Arguments& args);
+ static Handle ToString(const Arguments& args);
git_diff_patch *raw;
};
diff --git a/include/refdb.h b/include/refdb.h
index c5914e84f..51355028f 100644
--- a/include/refdb.h
+++ b/include/refdb.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitRefDb : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_refdb *GetValue();
@@ -30,7 +28,8 @@ class GitRefDb : public ObjectWrap {
GitRefDb(git_refdb *raw);
~GitRefDb();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
+
git_refdb *raw;
};
diff --git a/include/reference.h b/include/reference.h
index 7aef82a2c..ae7d18ad4 100644
--- a/include/reference.h
+++ b/include/reference.h
@@ -9,8 +9,6 @@
#include
#include
-#include "nan.h"
-
#include "git2.h"
using namespace node;
@@ -19,7 +17,7 @@ using namespace v8;
class GitReference : public ObjectWrap {
public:
- static Persistent constructor_template;
+ static Persistent constructor_template;
static void Initialize (Handle target);
git_reference *GetValue();
@@ -30,10 +28,10 @@ class GitReference : public ObjectWrap {
GitReference(git_reference *raw);
~GitReference();
- static NAN_METHOD(New);
+ static Handle New(const Arguments& args);
- static NAN_METHOD(OidForName);
+ static Handle OidForName(const Arguments& args);
static void OidForNameWork(uv_work_t* req);
static void OidForNameAfterWork(uv_work_t* req);
@@ -48,12 +46,11 @@ class GitReference : public ObjectWrap {
const char * name;
Persistent callback;
};
- static NAN_METHOD(Target);
- static NAN_METHOD(SymbolicTarget);
- static NAN_METHOD(Type);
- static NAN_METHOD(Name);
- static NAN_METHOD(Resolve);
-
+ static Handle Target(const Arguments& args);
+ static Handle SymbolicTarget(const Arguments& args);
+ static Handle Type(const Arguments& args);
+ static Handle Name(const Arguments& args);
+ static Handle Resolve(const Arguments& args);
static void ResolveWork(uv_work_t* req);
static void ResolveAfterWork(uv_work_t* req);
@@ -66,11 +63,9 @@ class GitReference : public ObjectWrap {
const git_reference * ref;
Persistent callback;
};
-
- static NAN_METHOD(SetSymbolicTarget);
- static NAN_METHOD(setTarget);
- static NAN_METHOD(Rename);
-
+ static Handle SetSymbolicTarget(const Arguments& args);
+ static Handle setTarget(const Arguments& args);
+ static Handle Rename(const Arguments& args);
static void RenameWork(uv_work_t* req);
static void RenameAfterWork(uv_work_t* req);
@@ -87,8 +82,7 @@ class GitReference : public ObjectWrap {
int force;
Persistent callback;
};
- static NAN_METHOD(Delete);
-
+ static Handle Delete(const Arguments& args);
static void DeleteWork(uv_work_t* req);
static void DeleteAfterWork(uv_work_t* req);
@@ -100,11 +94,10 @@ class GitReference : public ObjectWrap {
git_reference * ref;
Persistent callback;
};
- static NAN_METHOD(IsBranch);
- static NAN_METHOD(IsRemote);
- static NAN_METHOD(Peel);
- static NAN_METHOD(IsValidName);
-
+ static Handle IsBranch(const Arguments& args);
+ static Handle IsRemote(const Arguments& args);
+ static Handle Peel(const Arguments& args);
+ static Handle IsValidName(const Arguments& args);
git_reference *raw;
};
diff --git a/include/remote.h b/include/remote.h
index bf782f620..81fd1ac68 100644
--- a/include/remote.h
+++ b/include/remote.h
@@ -9,8 +9,6 @@
#include