+
+
+
+
+ API Viewer
+
+
+
+
+
+
+
+
diff --git a/api-viewer/package.json b/api-viewer/package.json
new file mode 100644
index 0000000..5e76867
--- /dev/null
+++ b/api-viewer/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "api-viewer",
+ "devDependencies": {
+ "grunt": "^0.4.5",
+ "grunt-contrib-requirejs": "^0.4.4"
+ }
+}
diff --git a/api-viewer/src/components/api-list/api-list.js b/api-viewer/src/components/api-list/api-list.js
new file mode 100644
index 0000000..87e5b74
--- /dev/null
+++ b/api-viewer/src/components/api-list/api-list.js
@@ -0,0 +1,20 @@
+define(function(require, exports, module) {
+ "use strict";
+
+ var Component = require("webapp/component");
+ var template = require("template!./template");
+
+ var ApiList = Component.extend({
+ template: template,
+
+ initialize: function() {
+ this.channel.subscribe(this.render, this);
+ },
+
+ afterRender: function() {
+ console.log("here");
+ }
+ });
+
+ module.exports = ApiList;
+});
diff --git a/api-viewer/src/components/api-list/template.html b/api-viewer/src/components/api-list/template.html
new file mode 100644
index 0000000..c27e7da
--- /dev/null
+++ b/api-viewer/src/components/api-list/template.html
@@ -0,0 +1,7 @@
+
+{%each%}
+
+ {{jsClassName}}
+
+{%endeach%}
+
diff --git a/api-viewer/src/components/api-viewer/api-viewer.js b/api-viewer/src/components/api-viewer/api-viewer.js
new file mode 100644
index 0000000..74f2864
--- /dev/null
+++ b/api-viewer/src/components/api-viewer/api-viewer.js
@@ -0,0 +1,32 @@
+define(function(require, exports, module) {
+ "use strict";
+
+ var $ = require("jquery");
+ var Component = require("webapp/component");
+ var Channel = require("webapp/channel");
+ var ApiList = require("../api-list/api-list");
+ var template = require("template!./template");
+
+ Component.register(ApiList, "api-list");
+
+ var ApiViewer = Component.extend({
+ template: template,
+ channel: "api-viewer",
+
+ afterRender: function() {
+ ApiList.activateAll(this.$el);
+ },
+
+ getApi: function(version) {
+ return $.getJSON("/api-viewer/versions/" + version + ".json");
+ },
+
+ initialize: function() {
+ this.channel.subscribe("version", function(value) {
+ this.getApi(value).then(this.channel.publish.bind(this.channel));
+ }, this);
+ }
+ });
+
+ module.exports = ApiViewer;
+});
diff --git a/api-viewer/src/components/api-viewer/template.html b/api-viewer/src/components/api-viewer/template.html
new file mode 100644
index 0000000..cd7b724
--- /dev/null
+++ b/api-viewer/src/components/api-viewer/template.html
@@ -0,0 +1 @@
+
diff --git a/api-viewer/src/config.js b/api-viewer/src/config.js
new file mode 100644
index 0000000..4d12a3a
--- /dev/null
+++ b/api-viewer/src/config.js
@@ -0,0 +1,15 @@
+require.config({
+ packages: [{
+ "name": "webapp",
+ "main": "index.js",
+ "location": "../bower_components/webapp/lib"
+ }],
+
+ paths: {
+ "bower_components": "../bower_components",
+ "combyne": "../bower_components/combyne/dist/combyne",
+ "template": "../bower_components/combyne-amd-loader/loader"
+ },
+
+ deps: ["webapp/config"]
+});
diff --git a/api-viewer/src/index.js b/api-viewer/src/index.js
new file mode 100644
index 0000000..ea3ebc2
--- /dev/null
+++ b/api-viewer/src/index.js
@@ -0,0 +1,23 @@
+define(function(require, exports, module) {
+ "use strict";
+
+ require("webapp/config");
+
+ var Component = require("webapp/component");
+ var ApiViewer = require("./components/api-viewer/api-viewer");
+
+ Component.configure({
+ fetchTemplate: function(template) {
+ return template;
+ },
+
+ renderTemplate: function(template, context) {
+ return template.render(context);
+ }
+ });
+
+ // Register the components for this application.
+ Component.register(ApiViewer, "api-viewer").activateAll();
+
+ module.exports = ApiViewer;
+});
diff --git a/api-viewer/versions/wip.json b/api-viewer/versions/wip.json
new file mode 100644
index 0000000..9e9ce95
--- /dev/null
+++ b/api-viewer/versions/wip.json
@@ -0,0 +1,4416 @@
+[
+ {
+ "cType": null,
+ "functions": [
+ {
+ "cFunctionName": "git_attr_get",
+ "ignore": false,
+ "description": "Look up the value of one git attribute for path.
\n",
+ "cppFunctionName": "Get",
+ "jsFunctionName": "get",
+ "return": {
+ "cType": "int",
+ "comment": null,
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "value_out",
+ "cType": "const char **",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "Output of the value of the attribute. Use the GIT_ATTR_...\n macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just\n use the string value for attributes set to a value. You\n should NOT modify or free this value.",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "The repository containing the path.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "flags",
+ "cType": "uint32_t",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "A combination of GIT_ATTR_CHECK... flags.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "The path to check for attributes. Relative paths are\n interpreted relative to the repo root. The file does\n not have to exist, but if it does not, then it will be\n treated as a plain file (not a directory).",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "name",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "The name of the attribute to look up.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_attr_get_many",
+ "ignore": false,
+ "description": "Look up a list of git attributes for path.
\n",
+ "cppFunctionName": "GetMany",
+ "jsFunctionName": "getMany",
+ "return": {
+ "cType": "int",
+ "comment": null,
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "values_out",
+ "cType": "const char **",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "An array of num_attr entries that will have string\n pointers written into it for the values of the attributes.\n You should not modify or free the values that are written\n into this array (although of course, you should free the\n array itself if you allocated it).",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "The repository containing the path.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "flags",
+ "cType": "uint32_t",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "A combination of GIT_ATTR_CHECK... flags.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "The path inside the repo to check attributes. This\n does not have to exist, but if it does not, then\n it will be treated as a plain file (i.e. not a directory).",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "num_attr",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "The number of attributes being looked up",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "names",
+ "cType": "const char **",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "An array of num_attr strings containing attribute names.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "Use this if you have a known list of attributes that you want to\n look up in a single call. This is somewhat more efficient than\n calling git_attr_get() multiple times.
\n\nFor example, you might write:
\n\n const char *attrs[] = { "crlf", "diff", "foo" };\n const char **values[3];\n git_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);\n \n\nThen you could loop through the 3 values to get the settings for\n the three attributes you asked about.
\n"
+ },
+ {
+ "cFunctionName": "git_attr_foreach",
+ "ignore": true,
+ "description": "Loop over all the git attributes for a path.
\n",
+ "cppFunctionName": "Foreach",
+ "jsFunctionName": "foreach",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 on success, non-zero callback return value, or error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "The repository containing the path.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "flags",
+ "cType": "uint32_t",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "A combination of GIT_ATTR_CHECK... flags.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "Path inside the repo to check attributes. This does not have\n to exist, but if it does not, then it will be treated as a\n plain file (i.e. not a directory).",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "callback",
+ "cType": "git_attr_foreach_cb",
+ "cppClassName": "AttrForeachCb",
+ "jsClassName": "AttrForeachCb",
+ "comment": "Function to invoke on each attribute name and value. The\n value may be NULL is the attribute is explicitly set to\n UNSPECIFIED using the '!' sign. Callback will be invoked\n only once per attribute name, even if there are multiple\n rules for a given file. The highest priority rule will be\n used. Return a non-zero value from this to stop looping.\n The value will be returned from `git_attr_foreach`.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "payload",
+ "cType": "void *",
+ "cppClassName": "Function",
+ "jsClassName": "Function",
+ "comment": "Passed on as extra parameter to callback function.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_attr_cache_flush",
+ "ignore": false,
+ "description": "Flush the gitattributes cache.
\n",
+ "cppFunctionName": "CacheFlush",
+ "jsFunctionName": "cacheFlush",
+ "return": {
+ "cType": "void",
+ "comment": null,
+ "cppClassName": "void",
+ "jsClassName": "void"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": null,
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "Call this if you have reason to believe that the attributes files on\n disk no longer match the cached contents of memory. This will cause\n the attributes files to be reloaded the next time that an attribute\n access function is called.
\n"
+ },
+ {
+ "cFunctionName": "git_attr_add_macro",
+ "ignore": false,
+ "description": "Add a macro definition.
\n",
+ "cppFunctionName": "AddMacro",
+ "jsFunctionName": "addMacro",
+ "return": {
+ "cType": "int",
+ "comment": null,
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": null,
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "name",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": null,
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "values",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": null,
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "Macros will automatically be loaded from the top level .gitattributes\n file of the repository (plus the build-in "binary" macro). This\n function allows you to add others. For example, to add the default\n macro, you would call:
\n\n git_attr_add_macro(repo, "binary", "-diff -crlf");\n \n"
+ }
+ ],
+ "filename": "attr.h",
+ "ignore": false,
+ "cppClassName": "GitAttr",
+ "jsClassName": "Attr",
+ "dependencies": [
+ "../include/repository.h"
+ ],
+ "fields": []
+ },
+ {
+ "filename": "blame.h",
+ "ignore": false,
+ "cppClassName": "GitBlame",
+ "jsClassName": "Blame",
+ "cType": "git_blame",
+ "description": "",
+ "freeFunctionName": "git_blame_free",
+ "dependencies": [
+ "../include/blame.h",
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "dependencies": [
+ "../include/wrapper.h",
+ "node_buffer.h",
+ "../include/blob.h",
+ "../include/repository.h",
+ "../include/oid.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_blob_lookup",
+ "ignore": false,
+ "description": "Lookup a blob object from a repository.
\n",
+ "cppFunctionName": "Lookup",
+ "jsFunctionName": "lookup",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "blob",
+ "cType": "git_blob **",
+ "cppClassName": "GitBlob",
+ "jsClassName": "Blob",
+ "comment": "pointer to the looked up blob",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the repo to use when locating the blob.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "id",
+ "cType": "const git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "identity of the blob to locate.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_blob_rawcontent",
+ "ignore": false,
+ "description": "Get a read-only buffer with the raw content of a blob.
\n",
+ "cppFunctionName": "Rawcontent",
+ "jsFunctionName": "rawcontent",
+ "return": {
+ "cppClassName": "Wrapper",
+ "cType": "const void *",
+ "comment": " the pointer",
+ "jsClassName": "Buffer"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "blob",
+ "cType": "const git_blob *",
+ "cppClassName": "GitBlob",
+ "jsClassName": "Blob",
+ "comment": "pointer to the blob",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "A pointer to the raw content of a blob is returned;\n this pointer is owned internally by the object and shall\n not be free'd. The pointer may be invalidated at a later\n time.
\n"
+ },
+ {
+ "cFunctionName": "git_blob_rawsize",
+ "ignore": false,
+ "description": "Get the size in bytes of the contents of a blob
\n",
+ "cppFunctionName": "Rawsize",
+ "jsFunctionName": "rawsize",
+ "return": {
+ "cType": "git_off_t",
+ "comment": " size on bytes",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "blob",
+ "cType": "const git_blob *",
+ "cppClassName": "GitBlob",
+ "jsClassName": "Blob",
+ "comment": "pointer to the blob",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_blob_create_frombuffer",
+ "ignore": false,
+ "description": "Write an in-memory buffer to the ODB as a blob
\n",
+ "cppFunctionName": "CreateFrombuffer",
+ "jsFunctionName": "createFrombuffer",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "id",
+ "cType": "git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "return the id of the written blob",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": true
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "repository where to blob will be written",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "buffer",
+ "cType": "const void *",
+ "cppClassName": "Buffer",
+ "jsClassName": "Buffer",
+ "comment": "data to be written into the blob",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "len",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "length of the data",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_blob_is_binary",
+ "ignore": false,
+ "description": "Determine if the blob content is most certainly binary or not.
\n",
+ "cppFunctionName": "IsBinary",
+ "jsFunctionName": "isBinary",
+ "return": {
+ "cType": "int",
+ "comment": " 1 if the content of the blob is detected\n as binary; 0 otherwise.",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "blob",
+ "cType": "const git_blob *",
+ "cppClassName": "GitBlob",
+ "jsClassName": "Blob",
+ "comment": "The blob which content should be analyzed",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "The heuristic used to guess if a file is binary is taken from core git:\n Searching for NUL bytes and looking for a reasonable ratio of printable\n to non-printable characters among the first 8000 bytes.
\n"
+ }
+ ],
+ "filename": "blob.h",
+ "ignore": false,
+ "cppClassName": "GitBlob",
+ "jsClassName": "Blob",
+ "cType": "git_blob",
+ "description": " In-memory representation of a blob object. ",
+ "freeFunctionName": "git_blob_free",
+ "fields": []
+ },
+ {
+ "cType": null,
+ "filename": "branch.h",
+ "ignore": false,
+ "cppClassName": "GitBranch",
+ "jsClassName": "Branch",
+ "dependencies": [
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "buffer.h",
+ "ignore": false,
+ "cppClassName": "GitBuffer",
+ "jsClassName": "Buffer",
+ "cType": "git_buf",
+ "description": " A data buffer for exporting data from libgit2",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "dependencies": [
+ "../include/functions/copy.h",
+ "../include/checkout.h",
+ "../include/checkout_options.h",
+ "../include/repository.h",
+ "../include/index.h",
+ "../include/object.h",
+ "../include/checkout_options.h",
+ "../include/repository.h",
+ "../include/index.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_checkout_init_options",
+ "ignore": true,
+ "description": "Initializes a git_checkout_options with default values. Equivalent to\n creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
\n",
+ "cppFunctionName": "InitOptions",
+ "jsFunctionName": "initOptions",
+ "return": {
+ "cType": "int",
+ "comment": " Zero on success; -1 on failure.",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "opts",
+ "cType": "git_checkout_options *",
+ "cppClassName": "GitCheckoutOptions",
+ "jsClassName": "CheckoutOptions",
+ "comment": "the `git_checkout_options` struct to initialize.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "version",
+ "cType": "unsigned int",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "Version of struct; pass `GIT_CHECKOUT_OPTIONS_VERSION`",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_checkout_head",
+ "ignore": false,
+ "description": "Updates files in the index and the working tree to match the content of\n the commit pointed at by HEAD.
\n",
+ "cppFunctionName": "Head",
+ "jsFunctionName": "head",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, GIT_EUNBORNBRANCH if HEAD points to a non\n existing branch, non-zero value returned by `notify_cb`, or\n other error code \n<\n 0 (use giterr_last for error details)",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "repository to check out (must be non-bare)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "opts",
+ "cType": "const git_checkout_options *",
+ "cppClassName": "GitCheckoutOptions",
+ "jsClassName": "CheckoutOptions",
+ "comment": "specifies checkout options (may be NULL)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_checkout_index",
+ "ignore": false,
+ "description": "Updates files in the working tree to match the content of the index.
\n",
+ "cppFunctionName": "Index",
+ "jsFunctionName": "index",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use giterr_last for error details)",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "repository into which to check out (must be non-bare)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "index",
+ "cType": "git_index *",
+ "cppClassName": "GitIndex",
+ "jsClassName": "Index",
+ "comment": "index to be checked out (or NULL to use repository index)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "opts",
+ "cType": "const git_checkout_options *",
+ "cppClassName": "GitCheckoutOptions",
+ "jsClassName": "CheckoutOptions",
+ "comment": "specifies checkout options (may be NULL)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_checkout_tree",
+ "ignore": false,
+ "description": "Updates files in the index and working tree to match the content of the\n tree pointed at by the treeish.
\n",
+ "cppFunctionName": "Tree",
+ "jsFunctionName": "tree",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use giterr_last for error details)",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "repository to check out (must be non-bare)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "treeish",
+ "cType": "const git_object *",
+ "cppClassName": "GitObject",
+ "jsClassName": "Object",
+ "comment": "a commit, tag or tree which content will be used to update\n the working directory (or NULL to use HEAD)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "opts",
+ "cType": "const git_checkout_options *",
+ "cppClassName": "GitCheckoutOptions",
+ "jsClassName": "CheckoutOptions",
+ "comment": "specifies checkout options (may be NULL)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ }
+ ],
+ "filename": "checkout.h",
+ "ignore": false,
+ "cppClassName": "GitCheckout",
+ "jsClassName": "Checkout",
+ "fields": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_checkout_options",
+ "dependencies": [
+ "../include/strarray.h",
+ "../include/functions/copy.h",
+ "../include/checkout_options.h",
+ "../include/tree.h"
+ ],
+ "fields": [],
+ "filename": "checkout_options.h",
+ "ignore": false,
+ "cppClassName": "GitCheckoutOptions",
+ "jsClassName": "CheckoutOptions",
+ "description": " Checkout options structure",
+ "functions": []
+ },
+ {
+ "cType": null,
+ "trim": false,
+ "dependencies": [
+ "../include/signature.h",
+ "../include/checkout_options.h",
+ "../include/repository.h",
+ "../include/remote.h",
+ "../include/clone_options.h",
+ "../include/repository.h",
+ "../include/remote.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_clone",
+ "ignore": false,
+ "description": "Clone a remote repository.
\n",
+ "cppFunctionName": "Clone",
+ "jsFunctionName": "clone",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `giterr_last` for a detailed error message)",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_repository **",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "pointer that will receive the resulting repository object",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "url",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the remote repository to clone",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "local_path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "local directory to clone to",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "options",
+ "cType": "const git_clone_options *",
+ "cppClassName": "GitCloneOptions",
+ "jsClassName": "CloneOptions",
+ "comment": "configuration options for the clone. If NULL, the\n function works as though GIT_OPTIONS_INIT were passed.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false,
+ "isOptional": true
+ }
+ ],
+ "isAsync": true,
+ "comment": "This version handles the simple case. If you'd like to create the\n repository or remote with non-default settings, you can create and\n configure them and then use git_clone_into().
\n"
+ },
+ {
+ "cFunctionName": "git_clone_into",
+ "ignore": false,
+ "description": "Clone into a repository
\n",
+ "cppFunctionName": "CloneInto",
+ "jsFunctionName": "cloneInto",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `giterr_last` for a detailed error message)",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the repository to use",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "remote",
+ "cType": "git_remote *",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "the remote repository to clone from",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "co_opts",
+ "cType": "const git_checkout_options *",
+ "cppClassName": "GitCheckoutOptions",
+ "jsClassName": "CheckoutOptions",
+ "comment": "options to use during checkout",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false,
+ "isOptional": true
+ },
+ {
+ "name": "branch",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the branch to checkout after the clone, pass NULL for the\n remote's default branch",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "signature",
+ "cType": "const git_signature *",
+ "cppClassName": "GitSignature",
+ "jsClassName": "Signature",
+ "comment": "The identity used when updating the reflog.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "After creating the repository and remote and configuring them for\n paths and callbacks respectively, you can call this function to\n perform the clone operation and optionally checkout files.
\n"
+ }
+ ],
+ "filename": "clone.h",
+ "ignore": false,
+ "cppClassName": "GitClone",
+ "jsClassName": "Clone",
+ "fields": []
+ },
+ {
+ "cType": "git_clone_options",
+ "isStruct": true,
+ "isPublicStruct": true,
+ "dependencies": [
+ "../include/checkout_options.h",
+ "../include/remote_callbacks.h"
+ ],
+ "fields": [
+ {
+ "name": "version",
+ "cType": "int",
+ "cppFunctionName": "Version",
+ "jsFunctionName": "version",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "remote_callbacks",
+ "cType": "git_remote_callbacks",
+ "cppFunctionName": "RemoteCallbacks",
+ "jsFunctionName": "remoteCallbacks",
+ "cppClassName": "GitRemoteCallbacks",
+ "jsClassName": "RemoteCallbacks"
+ },
+ {
+ "name": "bare",
+ "cType": "int",
+ "cppFunctionName": "Bare",
+ "jsFunctionName": "bare",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "ignore_cert_errors",
+ "cType": "int",
+ "cppFunctionName": "IgnoreCertErrors",
+ "jsFunctionName": "ignoreCertErrors",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "remote_name",
+ "cType": "const char *",
+ "cppFunctionName": "RemoteName",
+ "jsFunctionName": "remoteName",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ {
+ "name": "checkout_branch",
+ "cType": "const char *",
+ "cppFunctionName": "CheckoutBranch",
+ "jsFunctionName": "checkoutBranch",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ }
+ ],
+ "filename": "clone_options.h",
+ "ignore": false,
+ "cppClassName": "GitCloneOptions",
+ "jsClassName": "CloneOptions",
+ "description": " Clone options structure",
+ "functions": []
+ },
+ {
+ "dependencies": [
+ "../include/signature.h",
+ "../include/commit.h",
+ "../include/repository.h",
+ "../include/tree.h",
+ "../include/oid.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_commit_lookup",
+ "ignore": false,
+ "description": "Lookup a commit object from a repository.
\n",
+ "cppFunctionName": "Lookup",
+ "jsFunctionName": "lookup",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "git_commit **",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "pointer to the looked up commit",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the repo to use when locating the commit.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": true
+ },
+ {
+ "name": "id",
+ "cType": "const git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "identity of the commit to locate. If the object is\n\t\tan annotated tag it will be peeled back to the commit.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "The returned object should be released with git_commit_free when no\n longer needed.
\n"
+ },
+ {
+ "cFunctionName": "git_commit_id",
+ "ignore": false,
+ "description": "Get the id of a commit.
\n",
+ "cppFunctionName": "Id",
+ "jsFunctionName": "id",
+ "return": {
+ "cType": "const git_oid *",
+ "comment": " object identity for the commit.",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_message",
+ "ignore": false,
+ "description": "Get the full message of a commit.
\n",
+ "cppFunctionName": "Message",
+ "jsFunctionName": "message",
+ "return": {
+ "cType": "const char *",
+ "comment": " the message of a commit",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": true
+ }
+ ],
+ "isAsync": false,
+ "comment": "The returned message will be slightly prettified by removing any\n potential leading newlines.
\n"
+ },
+ {
+ "cFunctionName": "git_commit_time",
+ "ignore": false,
+ "description": "Get the commit time (i.e. committer time) of a commit.
\n",
+ "cppFunctionName": "Time",
+ "jsFunctionName": "time",
+ "return": {
+ "cType": "git_time_t",
+ "comment": " the time of a commit",
+ "cppClassName": "Int32",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_time_offset",
+ "ignore": false,
+ "description": "Get the commit timezone offset (i.e. committer's preferred timezone) of a commit.
\n",
+ "cppFunctionName": "TimeOffset",
+ "jsFunctionName": "timeOffset",
+ "return": {
+ "cType": "int",
+ "comment": " positive or negative timezone offset, in minutes from UTC",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_committer",
+ "ignore": false,
+ "description": "Get the committer of a commit.
\n",
+ "cppFunctionName": "Committer",
+ "jsFunctionName": "committer",
+ "return": {
+ "cType": "const git_signature *",
+ "comment": " the committer of a commit",
+ "cppClassName": "GitSignature",
+ "jsClassName": "Signature"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_author",
+ "ignore": false,
+ "description": "Get the author of a commit.
\n",
+ "cppFunctionName": "Author",
+ "jsFunctionName": "author",
+ "return": {
+ "cType": "const git_signature *",
+ "comment": " the author of a commit",
+ "cppClassName": "GitSignature",
+ "jsClassName": "Signature"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_tree_id",
+ "ignore": false,
+ "description": "Get the id of the tree pointed to by a commit. This differs from\n git_commit_tree in that no attempts are made to fetch an object\n from the ODB.
\n",
+ "cppFunctionName": "TreeId",
+ "jsFunctionName": "treeId",
+ "return": {
+ "cType": "const git_oid *",
+ "comment": " the id of tree pointed to by commit.",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_parentcount",
+ "ignore": false,
+ "description": "Get the number of parents of this commit
\n",
+ "cppFunctionName": "Parentcount",
+ "jsFunctionName": "parentcount",
+ "return": {
+ "cType": "unsigned int",
+ "comment": " integer of count of parents",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_parent_id",
+ "ignore": false,
+ "description": "Get the oid of a specified parent for a commit. This is different from\n git_commit_parent, which will attempt to load the parent commit from\n the ODB.
\n",
+ "cppFunctionName": "ParentId",
+ "jsFunctionName": "parentId",
+ "return": {
+ "cType": "const git_oid *",
+ "comment": " the id of the parent, NULL on error.",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "commit",
+ "cType": "const git_commit *",
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "comment": "a previously loaded commit.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "n",
+ "cType": "unsigned int",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "the position of the parent (from 0 to `parentcount`)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_commit_create",
+ "ignore": false,
+ "description": "Create new commit in the repository from a list of git_object pointers
\n",
+ "cppFunctionName": "CreateCommit",
+ "jsFunctionName": "createCommit",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 or an error code\n\tThe created commit will be written to the Object Database and\n\tthe given reference will be updated to point to it",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "id",
+ "cType": "git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "Pointer in which to store the OID of the newly created commit",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": true
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "Repository where to store the commit",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "update_ref",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "If not NULL, name of the reference that\n\twill be updated to point to this commit. If the reference\n\tis not direct, it will be resolved to a direct reference.\n\tUse \"HEAD\" to update the HEAD of the current branch and\n\tmake it point to this commit. If the reference doesn't\n\texist yet, it will be created. If it does exist, the first\n\tparent must be the tip of this branch.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false,
+ "isOptional": true
+ },
+ {
+ "name": "author",
+ "cType": "const git_signature *",
+ "cppClassName": "GitSignature",
+ "jsClassName": "Signature",
+ "comment": "Signature with author and author time of commit",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "committer",
+ "cType": "const git_signature *",
+ "cppClassName": "GitSignature",
+ "jsClassName": "Signature",
+ "comment": "Signature with committer and * commit time of commit",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "message_encoding",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "The encoding for the message in the\n commit, represented with a standard encoding name.\n E.g. \"UTF-8\". If NULL, no encoding header is written and\n UTF-8 is assumed.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false,
+ "isOptional": true
+ },
+ {
+ "name": "message",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "Full message for this commit",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "tree",
+ "cType": "const git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "An instance of a `git_tree` object that will\n be used as the tree for the commit. This tree object must\n also be owned by the given `repo`.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "parent_count",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "Number of parents for this commit",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "parents",
+ "cType": "const git_commit **",
+ "cppClassName": "Array",
+ "jsClassName": "Array",
+ "comment": "Array of `parent_count` pointers to `git_commit`\n objects that will be used as the parents for this commit. This\n array may be NULL if `parent_count` is 0 (root commit). All the\n given commits must be owned by the `repo`.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false,
+ "arrayElementCppClassName": "GitCommit"
+ }
+ ],
+ "isAsync": true,
+ "comment": "The message will not be cleaned up automatically. You can do that\n with the git_message_prettify() function.
\n"
+ }
+ ],
+ "filename": "commit.h",
+ "ignore": false,
+ "cppClassName": "GitCommit",
+ "jsClassName": "Commit",
+ "cType": "git_commit",
+ "description": " Parsed representation of a commit object. ",
+ "freeFunctionName": "git_commit_free",
+ "fields": []
+ },
+ {
+ "cType": null,
+ "filename": "common.h",
+ "ignore": false,
+ "cppClassName": "GitCommon",
+ "jsClassName": "Common",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "config.h",
+ "ignore": false,
+ "cppClassName": "GitConfig",
+ "jsClassName": "Config",
+ "cType": "git_config",
+ "description": " Memory representation of a set of config files ",
+ "freeFunctionName": "git_config_free",
+ "dependencies": [
+ "../include/config.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "isStruct": true,
+ "filename": "cred.h",
+ "ignore": false,
+ "cppClassName": "GitCred",
+ "jsClassName": "Cred",
+ "cType": "git_diff",
+ "description": " The diff object that contains all individual file deltas.",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "cred_helpers.h",
+ "ignore": false,
+ "cppClassName": "GitCredHelpers",
+ "jsClassName": "CredHelpers",
+ "cType": "git_cred",
+ "description": "",
+ "dependencies": [
+ "../include/cred.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_diff_delta",
+ "dependencies": [
+ "../include/diff.h",
+ "../include/diff_file.h",
+ "../include/types.h"
+ ],
+ "fields": [
+ {
+ "name": "status",
+ "cType": "git_delta_t",
+ "cppFunctionName": "Status",
+ "jsFunctionName": "status",
+ "cppClassName": "Int32",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "flags",
+ "cType": "uint32_t",
+ "cppFunctionName": "Flags",
+ "jsFunctionName": "flags",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "similarity",
+ "cType": "uint16_t",
+ "cppFunctionName": "Similarity",
+ "jsFunctionName": "similarity",
+ "cppClassName": "Integer",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "nfiles",
+ "cType": "uint16_t",
+ "cppFunctionName": "Nfiles",
+ "jsFunctionName": "nfiles",
+ "cppClassName": "Integer",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "old_file",
+ "cType": "git_diff_file",
+ "cppFunctionName": "OldFile",
+ "jsFunctionName": "oldFile",
+ "cppClassName": "GitDiffFile",
+ "jsClassName": "DiffFile"
+ },
+ {
+ "name": "new_file",
+ "cType": "git_diff_file",
+ "cppFunctionName": "NewFile",
+ "jsFunctionName": "newFile",
+ "cppClassName": "GitDiffFile",
+ "jsClassName": "DiffFile"
+ }
+ ],
+ "filename": "delta.h",
+ "ignore": false,
+ "cppClassName": "GitDelta",
+ "jsClassName": "Delta",
+ "description": " Description of changes to one entry.",
+ "functions": []
+ },
+ {
+ "dependencies": [
+ "../include/diff.h",
+ "../include/delta.h",
+ "../include/repository.h",
+ "../include/tree.h",
+ "../include/index.h",
+ "../include/diff_options.h",
+ "../include/diff_options.h",
+ "../include/diff.h",
+ "../include/repository.h",
+ "../include/tree.h",
+ "../include/index.h",
+ "../include/commit.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_diff_tree_to_tree",
+ "ignore": false,
+ "description": "Create a diff with the difference between two tree objects.
\n",
+ "cppFunctionName": "TreeToTree",
+ "jsFunctionName": "treeToTree",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": null,
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "diff",
+ "cType": "git_diff **",
+ "cppClassName": "GitDiff",
+ "jsClassName": "Diff",
+ "comment": "Output pointer to a git_diff pointer to be allocated.",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "The repository containing the trees.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "old_tree",
+ "cType": "git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "A git_tree object to diff from, or NULL for empty tree.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "new_tree",
+ "cType": "git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "A git_tree object to diff to, or NULL for empty tree.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "opts",
+ "cType": "const git_diff_options *",
+ "cppClassName": "GitDiffOptions",
+ "jsClassName": "DiffOptions",
+ "comment": "Structure with options to influence diff or NULL for defaults.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false,
+ "isOptional": true
+ }
+ ],
+ "isAsync": true,
+ "comment": "This is equivalent to git diff \n<old\n-tree> \n<new\n-tree>
\n\nThe first tree will be used for the "old_file" side of the delta and the\n second tree will be used for the "new_file" side of the delta. You can\n pass NULL to indicate an empty tree, although it is an error to pass\n NULL for both the old_tree and new_tree.
\n"
+ },
+ {
+ "cFunctionName": "git_diff_num_deltas",
+ "ignore": false,
+ "description": "Query how many diff records are there in a diff.
\n",
+ "cppFunctionName": "NumDeltas",
+ "jsFunctionName": "numDeltas",
+ "return": {
+ "cType": "size_t",
+ "comment": " Count of number of deltas in the list",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "diff",
+ "cType": "const git_diff *",
+ "cppClassName": "GitDiff",
+ "jsClassName": "Diff",
+ "comment": "A git_diff generated by one of the above functions",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_diff_get_delta",
+ "ignore": false,
+ "description": "Return the diff delta for an entry in the diff list.
\n",
+ "cppFunctionName": "GetDelta",
+ "jsFunctionName": "getDelta",
+ "return": {
+ "cType": "const git_diff_delta *",
+ "copy": "git_diff_delta_dup",
+ "comment": " Pointer to git_diff_delta (or NULL if `idx` out of range)",
+ "cppClassName": "GitDelta",
+ "jsClassName": "Delta"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "diff",
+ "cType": "const git_diff *",
+ "cppClassName": "GitDiff",
+ "jsClassName": "Diff",
+ "comment": "Diff list object",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": true
+ },
+ {
+ "name": "idx",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "Index into diff list",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "The git_delta pointer points to internal data and you do not have\n to release it when you are done with it. It will go away when the\n git_diff (or any associated git_patch) goes away.
\n\nNote that the flags on the delta related to whether it has binary\n content or not may not be set if there are no attributes set for the\n file and there has been no reason to load the file data at this point.\n For now, if you need those flags to be up to date, your only option is\n to either use git_diff_foreach or create a git_patch.
\n"
+ }
+ ],
+ "filename": "diff.h",
+ "ignore": false,
+ "cppClassName": "GitDiff",
+ "jsClassName": "Diff",
+ "cType": "git_diff",
+ "description": " The diff object that contains all individual file deltas.",
+ "freeFunctionName": "git_diff_free",
+ "fields": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_diff_file",
+ "dependencies": [
+ "../include/diff.h",
+ "../include/oid.h",
+ "../include/types.h"
+ ],
+ "filename": "diff_file.h",
+ "ignore": false,
+ "cppClassName": "GitDiffFile",
+ "jsClassName": "DiffFile",
+ "description": " Description of one side of a delta.",
+ "fields": [
+ {
+ "type": "git_oid",
+ "name": "id",
+ "comments": "",
+ "cType": "git_oid",
+ "cppFunctionName": "Id",
+ "jsFunctionName": "id",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid"
+ },
+ {
+ "type": "const char *",
+ "name": "path",
+ "comments": "",
+ "cType": "const char *",
+ "cppFunctionName": "Path",
+ "jsFunctionName": "path",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ {
+ "type": "git_off_t",
+ "name": "size",
+ "comments": "",
+ "cType": "git_off_t",
+ "cppFunctionName": "Size",
+ "jsFunctionName": "size",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "type": "uint32_t",
+ "name": "flags",
+ "comments": "",
+ "cType": "uint32_t",
+ "cppFunctionName": "Flags",
+ "jsFunctionName": "flags",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "type": "uint16_t",
+ "name": "mode",
+ "comments": "",
+ "cType": "uint16_t",
+ "cppFunctionName": "Mode",
+ "jsFunctionName": "mode",
+ "cppClassName": "Integer",
+ "jsClassName": "Number"
+ }
+ ],
+ "functions": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_diff_line",
+ "dependencies": [
+ "../include/diff.h",
+ "../include/oid.h",
+ "../include/types.h"
+ ],
+ "fields": [
+ {
+ "name": "origin",
+ "cType": "int",
+ "cppFunctionName": "Origin",
+ "jsFunctionName": "origin",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "old_lineno",
+ "cType": "int",
+ "cppFunctionName": "OldLineno",
+ "jsFunctionName": "oldLineno",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "new_lineno",
+ "cType": "int",
+ "cppFunctionName": "NewLineno",
+ "jsFunctionName": "newLineno",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "num_lines",
+ "cType": "int",
+ "cppFunctionName": "NumLines",
+ "jsFunctionName": "numLines",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "content_len",
+ "cType": "size_t",
+ "cppFunctionName": "ContentLen",
+ "jsFunctionName": "contentLen",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "content_offset",
+ "cType": "git_off_t",
+ "cppFunctionName": "ContentOffset",
+ "jsFunctionName": "contentOffset",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "content",
+ "cType": "const char *",
+ "cppFunctionName": "Content",
+ "jsFunctionName": "content",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ }
+ ],
+ "filename": "diff_line.h",
+ "ignore": false,
+ "cppClassName": "GitDiffLine",
+ "jsClassName": "DiffLine",
+ "description": " Structure describing a line (or data span) of a diff.",
+ "functions": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_diff_options",
+ "dependencies": [
+ "../include/diff.h",
+ "../include/types.h"
+ ],
+ "fields": [
+ {
+ "name": "version",
+ "cType": "unsigned int",
+ "cppFunctionName": "Version",
+ "jsFunctionName": "version",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "flags",
+ "cType": "uint32_t",
+ "cppFunctionName": "Flags",
+ "jsFunctionName": "flags",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "ignore_submodules",
+ "cType": "git_submodule_ignore_t",
+ "cppFunctionName": "IgnoreSubmodules",
+ "jsFunctionName": "ignoreSubmodules",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "context_lines",
+ "cType": "uint16_t",
+ "cppFunctionName": "ContextLines",
+ "jsFunctionName": "contextLines",
+ "cppClassName": "Integer",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "interhunk_lines",
+ "cType": "uint16_t",
+ "cppFunctionName": "InterhunkLines",
+ "jsFunctionName": "interhunkLines",
+ "cppClassName": "Integer",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "max_size",
+ "cType": "git_off_t",
+ "cppFunctionName": "MaxSize",
+ "jsFunctionName": "maxSize",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "old_prefix",
+ "cType": "const char *",
+ "cppFunctionName": "OldPrefix",
+ "jsFunctionName": "oldPrefix",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ {
+ "name": "new_prefix",
+ "cType": "const char *",
+ "cppFunctionName": "NewPrefix",
+ "jsFunctionName": "newPrefix",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ }
+ ],
+ "filename": "diff_options.h",
+ "ignore": false,
+ "cppClassName": "GitDiffOptions",
+ "jsClassName": "DiffOptions",
+ "description": " Structure describing options about how the diff should be executed.",
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "errors.h",
+ "ignore": false,
+ "cppClassName": "GitErrors",
+ "jsClassName": "Errors",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "forwardDeclare": true,
+ "fields": [],
+ "filename": "filter.h",
+ "ignore": false,
+ "cppClassName": "GitFilter",
+ "jsClassName": "Filter",
+ "cType": "git_filter",
+ "description": " Filter structure used to register custom filters.",
+ "dependencies": [
+ "../include/repository.h",
+ "../include/blob.h"
+ ],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "graph.h",
+ "ignore": false,
+ "cppClassName": "GitGraph",
+ "jsClassName": "Graph",
+ "dependencies": [
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "ignore.h",
+ "ignore": false,
+ "cppClassName": "GitIgnore",
+ "jsClassName": "Ignore",
+ "dependencies": [
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "index.h",
+ "ignore": false,
+ "cppClassName": "GitIndex",
+ "jsClassName": "Index",
+ "cType": "git_index",
+ "description": " Memory representation of an index file. ",
+ "freeFunctionName": "git_index_free",
+ "dependencies": [
+ "../include/index.h",
+ "../include/oid.h",
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "indexer.h",
+ "ignore": false,
+ "cppClassName": "GitIndexer",
+ "jsClassName": "Indexer",
+ "cType": "git_indexer",
+ "description": "",
+ "freeFunctionName": "git_indexer_free",
+ "dependencies": [
+ "../include/indexer.h",
+ "../include/odb.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "inttypes.h",
+ "ignore": false,
+ "cppClassName": "GitInttypes",
+ "jsClassName": "Inttypes",
+ "dependencies": [
+ "../include/odb_backend.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "merge.h",
+ "ignore": false,
+ "cppClassName": "GitMerge",
+ "jsClassName": "Merge",
+ "dependencies": [
+ "../include/repository.h",
+ "../include/oid.h",
+ "../include/index.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "message.h",
+ "ignore": false,
+ "cppClassName": "GitMessage",
+ "jsClassName": "Message",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "net.h",
+ "ignore": false,
+ "cppClassName": "GitNet",
+ "jsClassName": "Net",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "notes.h",
+ "ignore": false,
+ "cppClassName": "GitNotes",
+ "jsClassName": "Notes",
+ "cType": "git_note",
+ "description": " Representation of a git note ",
+ "dependencies": [
+ "../include/repository.h",
+ "../include/oid.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "object.h",
+ "ignore": false,
+ "cppClassName": "GitObject",
+ "jsClassName": "Object",
+ "cType": "git_object",
+ "description": " Representation of a generic object in a repository ",
+ "freeFunctionName": "git_object_free",
+ "dependencies": [
+ "../include/object.h",
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "odb.h",
+ "ignore": false,
+ "cppClassName": "GitOdb",
+ "jsClassName": "Odb",
+ "cType": "git_odb",
+ "description": " An open object database handle. ",
+ "freeFunctionName": "git_odb_free",
+ "dependencies": [
+ "../include/odb.h",
+ "../include/oid.h",
+ "../include/odb_backend.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "odb_backend.h",
+ "ignore": false,
+ "cppClassName": "GitOdbBackend",
+ "jsClassName": "OdbBackend",
+ "cType": "git_odb",
+ "description": " An open object database handle. ",
+ "dependencies": [
+ "../include/odb_backend.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "fields": [],
+ "functions": [
+ {
+ "cFunctionName": "git_oid_fromstr",
+ "ignore": false,
+ "description": "Parse a hex formatted object id into a git_oid.
\n",
+ "cppFunctionName": "Fromstr",
+ "jsFunctionName": "fromstr",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "oid structure the result is written into.",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": true
+ },
+ {
+ "name": "str",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "input hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (40 bytes).",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_oid_allocfmt",
+ "ignore": false,
+ "description": "Format a git_oid into a newly allocated c-string.
\n",
+ "cppFunctionName": "Allocfmt",
+ "jsFunctionName": "allocfmt",
+ "return": {
+ "cType": "char *",
+ "comment": " the c-string; NULL if memory is exhausted. Caller must\n\t\t\tdeallocate the string with git__free().",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "id",
+ "cType": "const git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "the oid structure to format",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ }
+ ],
+ "filename": "oid.h",
+ "ignore": false,
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "cType": "git_oid",
+ "description": " Unique identity of any object (commit, tree, blob, tag). ",
+ "dependencies": [
+ "../include/oid.h"
+ ]
+ },
+ {
+ "filename": "pack.h",
+ "ignore": false,
+ "cppClassName": "GitPack",
+ "jsClassName": "Pack",
+ "cType": "git_packbuilder",
+ "description": " Representation of a git packbuilder ",
+ "dependencies": [
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "isStruct": true,
+ "forwardDeclare": true,
+ "dependencies": [
+ "../include/delta.h",
+ "../include/diff_file.h",
+ "../include/diff_line.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_patch_get_delta",
+ "ignore": false,
+ "description": "Get the delta associated with a patch
\n",
+ "cppFunctionName": "GetDelta",
+ "jsFunctionName": "getDelta",
+ "return": {
+ "copy": "git_diff_delta_dup",
+ "cType": "const git_diff_delta *",
+ "comment": null,
+ "cppClassName": "GitDelta",
+ "jsClassName": "Delta"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "patch",
+ "cType": "const git_patch *",
+ "cppClassName": "GitPatch",
+ "jsClassName": "Patch",
+ "comment": null,
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_patch_from_diff",
+ "ignore": false,
+ "description": "Return the diff delta and patch for an entry in the diff list.
\n",
+ "cppFunctionName": "FromDiff",
+ "jsFunctionName": "fromDiff",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, other value \n<\n 0 on error",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_patch **",
+ "cppClassName": "GitPatch",
+ "jsClassName": "Patch",
+ "comment": "Output parameter for the delta patch object",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "diff",
+ "cType": "git_diff *",
+ "cppClassName": "GitDiff",
+ "jsClassName": "Diff",
+ "comment": "Diff list object",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "idx",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "Index into diff list",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "The git_patch is a newly created object contains the text diffs\n for the delta. You have to call git_patch_free() when you are\n done with it. You can use the patch object to loop over all the hunks\n and lines in the diff of the one delta.
\n\nFor an unchanged file or a binary file, no git_patch will be\n created, the output will be set to NULL, and the binary flag will be\n set true in the git_diff_delta structure.
\n\nThe git_diff_delta pointer points to internal data and you do not have\n to release it when you are done with it. It will go away when the\n git_diff and git_patch go away.
\n\nIt is okay to pass NULL for either of the output parameters; if you pass\n NULL for the git_patch, then the text diff will not be calculated.
\n"
+ },
+ {
+ "cFunctionName": "git_patch_num_hunks",
+ "ignore": false,
+ "description": "Get the number of hunks in a patch
\n",
+ "cppFunctionName": "NumHunks",
+ "jsFunctionName": "numHunks",
+ "return": {
+ "cType": "size_t",
+ "comment": null,
+ "cppClassName": "Uint32",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "patch",
+ "cType": "const git_patch *",
+ "cppClassName": "GitPatch",
+ "jsClassName": "Patch",
+ "comment": null,
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_patch_num_lines_in_hunk",
+ "ignore": false,
+ "description": "Get the number of lines in a hunk.
\n",
+ "cppFunctionName": "NumLinesInHunk",
+ "jsFunctionName": "numLinesInHunk",
+ "return": {
+ "cType": "int",
+ "comment": " Number of lines in hunk or -1 if invalid hunk index",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "patch",
+ "cType": "const git_patch *",
+ "cppClassName": "GitPatch",
+ "jsClassName": "Patch",
+ "comment": "The git_patch object",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "hunk_idx",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "Index of the hunk",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_patch_get_line_in_hunk",
+ "ignore": false,
+ "description": "Get data about a line in a hunk of a patch.
\n",
+ "cppFunctionName": "GetLineInHunk",
+ "jsFunctionName": "getLineInHunk",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, \n<\n0 on failure",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "out",
+ "cType": "const git_diff_line **",
+ "cppClassName": "GitDiffLine",
+ "jsClassName": "DiffLine",
+ "comment": "The git_diff_line data for this line",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "patch",
+ "cType": "git_patch *",
+ "cppClassName": "GitPatch",
+ "jsClassName": "Patch",
+ "comment": "The patch to look in",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "hunk_idx",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "The index of the hunk",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "line_of_hunk",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "The index of the line in the hunk",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "Given a patch, a hunk index, and a line index in the hunk, this\n will return a lot of details about that line. If you pass a hunk\n index larger than the number of hunks or a line index larger than\n the number of lines in the hunk, this will return -1.
\n"
+ }
+ ],
+ "filename": "patch.h",
+ "ignore": false,
+ "cppClassName": "GitPatch",
+ "jsClassName": "Patch",
+ "cType": "git_patch",
+ "description": " The diff patch is used to store all the text diffs for a delta.",
+ "fields": []
+ },
+ {
+ "filename": "pathspec.h",
+ "ignore": false,
+ "cppClassName": "GitPathspec",
+ "jsClassName": "Pathspec",
+ "cType": "git_pathspec",
+ "description": " Compiled pathspec",
+ "freeFunctionName": "git_pathspec_free",
+ "dependencies": [
+ "../include/pathspec.h",
+ "../include/repository.h",
+ "../include/index.h",
+ "../include/tree.h",
+ "../include/diff.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "push.h",
+ "ignore": false,
+ "cppClassName": "GitPush",
+ "jsClassName": "Push",
+ "cType": "git_push",
+ "description": "",
+ "freeFunctionName": "git_push_free",
+ "dependencies": [
+ "../include/push.h",
+ "../include/remote.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "refdb.h",
+ "ignore": false,
+ "cppClassName": "GitRefdb",
+ "jsClassName": "Refdb",
+ "cType": "git_refdb",
+ "description": " An open refs database handle. ",
+ "freeFunctionName": "git_refdb_free",
+ "dependencies": [
+ "../include/refdb.h",
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "functions": [
+ {
+ "cFunctionName": "git_reference_lookup",
+ "ignore": false,
+ "description": "Lookup a reference by name in a repository.
\n",
+ "cppFunctionName": "Lookup",
+ "jsFunctionName": "lookup",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code.",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_reference **",
+ "cppClassName": "GitRefs",
+ "jsClassName": "Reference",
+ "comment": "pointer to the looked-up reference",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the repository to look up the reference",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "name",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "The returned reference must be freed by the user.
\n\nThe name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.
\n"
+ },
+ {
+ "cFunctionName": "git_reference_target",
+ "ignore": false,
+ "description": "Get the OID pointed to by a direct reference.
\n",
+ "cppFunctionName": "Target",
+ "jsFunctionName": "target",
+ "return": {
+ "copy": "git_oid_dup",
+ "cType": "const git_oid *",
+ "comment": " a pointer to the oid if available, NULL otherwise",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "ref",
+ "cType": "const git_reference *",
+ "cppClassName": "GitRefs",
+ "jsClassName": "Reference",
+ "comment": "The reference",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "Only available if the reference is direct (i.e. an object id reference,\n not a symbolic one).
\n\nTo find the OID of a symbolic ref, call git_reference_resolve() and\n then this function (or maybe use git_reference_name_to_id() to\n directly resolve a reference name all the way through to an OID).
\n"
+ },
+ {
+ "cFunctionName": "git_reference_type",
+ "ignore": false,
+ "description": "Get the type of a reference.
\n",
+ "cppFunctionName": "Type",
+ "jsFunctionName": "type",
+ "return": {
+ "cType": "git_ref_t",
+ "comment": " the type",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "ref",
+ "cType": "const git_reference *",
+ "cppClassName": "GitRefs",
+ "jsClassName": "Reference",
+ "comment": "The reference",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC)
\n"
+ }
+ ],
+ "filename": "refs.h",
+ "ignore": false,
+ "cppClassName": "GitRefs",
+ "jsClassName": "Refs",
+ "cType": "git_reference",
+ "description": " In-memory representation of a reference. ",
+ "dependencies": [
+ "../include/repository.h",
+ "../include/oid.h",
+ "../include/strarray.h",
+ "../include/object.h"
+ ],
+ "fields": []
+ },
+ {
+ "filename": "reflog.h",
+ "ignore": false,
+ "cppClassName": "GitReflog",
+ "jsClassName": "Reflog",
+ "cType": "git_reflog",
+ "description": " Representation of a reference log ",
+ "freeFunctionName": "git_reflog_free",
+ "dependencies": [
+ "../include/reflog.h",
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "refspec.h",
+ "ignore": false,
+ "cppClassName": "GitRefspec",
+ "jsClassName": "Refspec",
+ "cType": "git_refspec",
+ "description": "",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "dependencies": [
+ "../include/functions/copy.h",
+ "../include/remote.h",
+ "../include/strarray.h",
+ "../include/repository.h",
+ "../include/transport.h",
+ "../include/remote.h",
+ "../include/repository.h",
+ "../include/strarray.h",
+ "../include/transport.h",
+ "../include/remote_callbacks.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_remote_create",
+ "ignore": false,
+ "description": "Add a remote with the default fetch refspec to the repository's configuration. This\n calls git_remote_save before returning.
\n",
+ "cppFunctionName": "Create",
+ "jsFunctionName": "create",
+ "return": {
+ "cType": "int",
+ "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_remote **",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "the resulting remote",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the repository in which to create the remote",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "name",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the remote's name",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "url",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the remote's url",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_remote_load",
+ "ignore": false,
+ "description": "Get the information for a particular remote
\n",
+ "cppFunctionName": "Load",
+ "jsFunctionName": "load",
+ "return": {
+ "copy": "git_remote_dup",
+ "cType": "int",
+ "comment": " 0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_remote **",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "pointer to the new remote object",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the associated repository",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "name",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the remote's name",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "The name will be checked for validity.\n See git_tag_create() for rules about valid names.
\n"
+ },
+ {
+ "cFunctionName": "git_remote_name",
+ "ignore": false,
+ "description": "Get the remote's name
\n",
+ "cppFunctionName": "Name",
+ "jsFunctionName": "name",
+ "return": {
+ "cType": "const char *",
+ "comment": " a pointer to the name or NULL for in-memory remotes",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "remote",
+ "cType": "const git_remote *",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "the remote",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_remote_url",
+ "ignore": false,
+ "description": "Get the remote's url
\n",
+ "cppFunctionName": "Url",
+ "jsFunctionName": "url",
+ "return": {
+ "cType": "const char *",
+ "comment": " a pointer to the url",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "remote",
+ "cType": "const git_remote *",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "the remote",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_remote_pushurl",
+ "ignore": false,
+ "description": "Get the remote's url for pushing
\n",
+ "cppFunctionName": "Pushurl",
+ "jsFunctionName": "pushurl",
+ "return": {
+ "cType": "const char *",
+ "comment": " a pointer to the url or NULL if no special url for pushing is set",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "remote",
+ "cType": "const git_remote *",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "the remote",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_remote_list",
+ "ignore": false,
+ "description": "Get a list of the configured remotes for a repo
\n",
+ "cppFunctionName": "List",
+ "jsFunctionName": "list",
+ "return": {
+ "copy": "git_strarray_copy",
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_strarray *",
+ "cppClassName": "GitStrarray",
+ "jsClassName": "Strarray",
+ "comment": "a string array which receives the names of the remotes",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": true
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the repository to query",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "The string array must be freed by the user.
\n"
+ },
+ {
+ "cFunctionName": "git_remote_rename",
+ "ignore": false,
+ "description": "Give the remote a new name
\n",
+ "cppFunctionName": "Rename",
+ "jsFunctionName": "rename",
+ "return": {
+ "cType": "int",
+ "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "problems",
+ "cType": "git_strarray *",
+ "cppClassName": "GitStrarray",
+ "jsClassName": "Strarray",
+ "comment": "non-default refspecs cannot be renamed and will be\n stored here for further processing by the caller. Always free this\n strarray on succesful return.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "remote",
+ "cType": "git_remote *",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "the remote to rename",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "new_name",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the new name the remote should bear",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "All remote-tracking branches and configuration settings\n for the remote are updated.
\n\nThe new name will be checked for validity.\n See git_tag_create() for rules about valid names.
\n\nA temporary in-memory remote cannot be given a name with this method.
\n"
+ },
+ {
+ "cFunctionName": "git_remote_delete",
+ "ignore": false,
+ "description": "Delete an existing persisted remote.
\n",
+ "cppFunctionName": "Delete",
+ "jsFunctionName": "delete",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success, or an error code.",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "remote",
+ "cType": "git_remote *",
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "comment": "A valid remote",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "All remote-tracking branches and configuration settings\n for the remote will be removed.
\n"
+ }
+ ],
+ "filename": "remote.h",
+ "ignore": false,
+ "cppClassName": "GitRemote",
+ "jsClassName": "Remote",
+ "cType": "git_remote",
+ "description": "",
+ "freeFunctionName": "git_remote_free",
+ "fields": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_remote_callbacks",
+ "fields": [],
+ "filename": "remote_callbacks.h",
+ "ignore": false,
+ "cppClassName": "GitRemoteCallbacks",
+ "jsClassName": "RemoteCallbacks",
+ "description": " The callback settings structure",
+ "dependencies": [],
+ "functions": []
+ },
+ {
+ "dependencies": [
+ "../include/functions/copy.h",
+ "../include/repository.h",
+ "../include/repository.h",
+ "../include/odb.h",
+ "../include/config.h",
+ "../include/refdb.h",
+ "../include/index.h",
+ "../include/oid.h",
+ "../include/repository_init_options.h",
+ "../include/repository.h",
+ "../include/odb.h",
+ "../include/repository_init_options.h",
+ "../include/config.h",
+ "../include/refdb.h",
+ "../include/index.h",
+ "../include/oid.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_repository_open",
+ "ignore": false,
+ "description": "Open a git repository.
\n",
+ "cppFunctionName": "Open",
+ "jsFunctionName": "open",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_repository **",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "pointer to the repo which will be opened",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the path to the repository",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "The 'path' argument must point to either a git repository\n folder, or an existing work dir.
\n\nThe method will automatically detect if 'path' is a normal\n or bare repository or fail is 'path' is neither.
\n"
+ },
+ {
+ "cFunctionName": "git_repository_init",
+ "ignore": false,
+ "description": "Creates a new Git repository in the given folder.
\n",
+ "cppFunctionName": "Init",
+ "jsFunctionName": "init",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_repository **",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "pointer to the repo which will be created or reinitialized",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the path to the repository",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "is_bare",
+ "cType": "unsigned int",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "if true, a Git repository without a working directory is\n\t\tcreated at the pointed path. If false, provided path will be\n\t\tconsidered as the working directory into which the .git directory\n\t\twill be created.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "TODO:\n - Reinit the repository
\n"
+ },
+ {
+ "cFunctionName": "git_repository_init_init_options",
+ "ignore": false,
+ "description": "Initializes a git_repository_init_options with default values. Equivalent\n to creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.
\n",
+ "cppFunctionName": "InitInitOptions",
+ "jsFunctionName": "initInitOptions",
+ "return": {
+ "cType": "int",
+ "comment": " Zero on success; -1 on failure.",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "opts",
+ "cType": "git_repository_init_options *",
+ "cppClassName": "GitRepositoryInitOptions",
+ "jsClassName": "RepositoryInitOptions",
+ "comment": "the `git_repository_init_options` struct to initialize",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "version",
+ "cType": "unsigned int",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "Version of struct; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_repository_init_ext",
+ "ignore": false,
+ "description": "Create a new Git repository in the given folder with extended controls.
\n",
+ "cppFunctionName": "InitExt",
+ "jsFunctionName": "initExt",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code on failure.",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_repository **",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "Pointer to the repo which will be created or reinitialized.",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo_path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "The path to the repository.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "opts",
+ "cType": "git_repository_init_options *",
+ "cppClassName": "GitRepositoryInitOptions",
+ "jsClassName": "RepositoryInitOptions",
+ "comment": "Pointer to git_repository_init_options struct.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "This will initialize a new git repository (creating the repo_path\n if requested by flags) and working directory as needed. It will\n auto-detect the case sensitivity of the file system and if the\n file system supports file mode bits correctly.
\n"
+ },
+ {
+ "cFunctionName": "git_repository_index",
+ "ignore": false,
+ "description": "Get the Index file for this repository.
\n",
+ "cppFunctionName": "Index",
+ "jsFunctionName": "index",
+ "return": {
+ "cType": "int",
+ "comment": " 0, or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_index **",
+ "cppClassName": "GitIndex",
+ "jsClassName": "Index",
+ "comment": "Pointer to store the loaded index",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "A repository object",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "If a custom index has not been set, the default\n index for the repository will be returned (the one\n located in .git/index).
\n\nThe index must be freed once it's no longer being used by\n the user.
\n"
+ }
+ ],
+ "filename": "repository.h",
+ "ignore": false,
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "cType": "git_repository",
+ "description": " Representation of an existing git repository,\n including all its object contents",
+ "freeFunctionName": "git_repository_free",
+ "fields": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_repository_init_options",
+ "fields": [],
+ "filename": "repository_init_options.h",
+ "ignore": false,
+ "cppClassName": "GitRepositoryInitOptions",
+ "jsClassName": "RepositoryInitOptions",
+ "description": " Extended options structure for `git_repository_init_ext`.",
+ "dependencies": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "reset.h",
+ "ignore": false,
+ "cppClassName": "GitReset",
+ "jsClassName": "Reset",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "revparse.h",
+ "ignore": false,
+ "cppClassName": "GitRevparse",
+ "jsClassName": "Revparse",
+ "dependencies": [
+ "../include/object.h",
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "functions": [
+ {
+ "cFunctionName": "git_revwalk_new",
+ "ignore": false,
+ "description": "Allocate a new revision walker to iterate through a repo.
\n",
+ "cppFunctionName": "CreateRevwalk",
+ "jsFunctionName": "createRevwalk",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_revwalk **",
+ "cppClassName": "GitRevwalk",
+ "jsClassName": "Revwalk",
+ "comment": "pointer to the new revision walker",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "the repo to walk through",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "This revision walker uses a custom memory pool and an internal\n commit cache, so it is relatively expensive to allocate.
\n\nFor maximum performance, this revision walker should be\n reused for different walks.
\n\nThis revision walker is not thread safe: it may only be\n used to walk a repository on a single thread; however,\n it is possible to have several revision walkers in\n several different threads walking the same repository.
\n"
+ },
+ {
+ "cFunctionName": "git_revwalk_push",
+ "ignore": false,
+ "description": "Mark a commit to start traversal from.
\n",
+ "cppFunctionName": "Push",
+ "jsFunctionName": "push",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "walk",
+ "cType": "git_revwalk *",
+ "cppClassName": "GitRevwalk",
+ "jsClassName": "Revwalk",
+ "comment": "the walker being used for the traversal.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "id",
+ "cType": "const git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "the oid of the commit to start from.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "The given OID must belong to a committish on the walked\n repository.
\n\nThe given commit will be used as one of the roots\n when starting the revision walk. At least one commit\n must be pushed onto the walker before a walk can\n be started.
\n"
+ },
+ {
+ "cFunctionName": "git_revwalk_hide",
+ "ignore": false,
+ "description": "Mark a commit (and its ancestors) uninteresting for the output.
\n",
+ "cppFunctionName": "Hide",
+ "jsFunctionName": "hide",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "walk",
+ "cType": "git_revwalk *",
+ "cppClassName": "GitRevwalk",
+ "jsClassName": "Revwalk",
+ "comment": "the walker being used for the traversal.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "commit_id",
+ "cType": "const git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "the oid of commit that will be ignored during the traversal",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "The given OID must belong to a committish on the walked\n repository.
\n\nThe resolved commit and all its parents will be hidden from the\n output on the revision walk.
\n"
+ },
+ {
+ "cFunctionName": "git_revwalk_next",
+ "ignore": false,
+ "description": "Get the next commit from the revision walk.
\n",
+ "cppFunctionName": "Next",
+ "jsFunctionName": "next",
+ "return": {
+ "cType": "int",
+ "comment": " 0 if the next commit was found;\n\tGIT_ITEROVER if there are no commits left to iterate",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "Pointer where to store the oid of the next commit",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": true
+ },
+ {
+ "name": "walk",
+ "cType": "git_revwalk *",
+ "cppClassName": "GitRevwalk",
+ "jsClassName": "Revwalk",
+ "comment": "the walker to pop the commit from.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "The initial call to this method is not blocking when\n iterating through a repo with a time-sorting mode.
\n\nIterating with Topological or inverted modes makes the initial\n call blocking to preprocess the commit list, but this block should be\n mostly unnoticeable on most repositories (topological preprocessing\n times at 0.3s on the git.git repo).
\n\nThe revision walker is reset when the walk is over.
\n"
+ },
+ {
+ "cFunctionName": "git_revwalk_sorting",
+ "ignore": false,
+ "description": "Change the sorting mode when iterating through the\n repository's contents.
\n",
+ "cppFunctionName": "Sorting",
+ "jsFunctionName": "sorting",
+ "return": {
+ "cType": "void",
+ "comment": null,
+ "cppClassName": "void",
+ "jsClassName": "void"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "walk",
+ "cType": "git_revwalk *",
+ "cppClassName": "GitRevwalk",
+ "jsClassName": "Revwalk",
+ "comment": "the walker being used for the traversal.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "sort_mode",
+ "cType": "unsigned int",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "combination of GIT_SORT_XXX flags",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "Changing the sorting mode resets the walker.
\n"
+ },
+ {
+ "cFunctionName": "git_revwalk_simplify_first_parent",
+ "ignore": false,
+ "description": "Simplify the history by first-parent
\n",
+ "cppFunctionName": "SimplifyFirstParent",
+ "jsFunctionName": "simplifyFirstParent",
+ "return": {
+ "cType": "void",
+ "comment": null,
+ "cppClassName": "void",
+ "jsClassName": "void"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "walk",
+ "cType": "git_revwalk *",
+ "cppClassName": "GitRevwalk",
+ "jsClassName": "Revwalk",
+ "comment": null,
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "No parents other than the first for each commit will be enqueued.
\n"
+ }
+ ],
+ "filename": "revwalk.h",
+ "ignore": false,
+ "cppClassName": "GitRevwalk",
+ "jsClassName": "Revwalk",
+ "cType": "git_revwalk",
+ "description": " Representation of an in-progress walk through the commits in a repo ",
+ "freeFunctionName": "git_revwalk_free",
+ "dependencies": [
+ "../include/revwalk.h",
+ "../include/repository.h",
+ "../include/oid.h"
+ ],
+ "fields": []
+ },
+ {
+ "dependencies": [
+ "../include/time.h",
+ "../include/signature.h",
+ "../include/repository.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_signature_new",
+ "ignore": false,
+ "description": "Create a new action signature.
\n",
+ "cppFunctionName": "Create",
+ "jsFunctionName": "create",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_signature **",
+ "cppClassName": "GitSignature",
+ "jsClassName": "Signature",
+ "comment": "new signature, in case of error NULL",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "name",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "name of the person",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "email",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "email of the person",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "time",
+ "cType": "git_time_t",
+ "cppClassName": "Int32",
+ "jsClassName": "Number",
+ "comment": "time when the action happened",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "offset",
+ "cType": "int",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "timezone offset in minutes for the time",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "Call git_signature_free() to free the data.
\n\nNote: angle brackets ('\n<\n' and '>') characters are not allowed\n to be used in either the name or the email parameter.
\n"
+ }
+ ],
+ "fields": [
+ {
+ "name": "name",
+ "cType": "const char *",
+ "cppFunctionName": "Name",
+ "jsFunctionName": "name",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ {
+ "name": "email",
+ "cType": "const char *",
+ "cppFunctionName": "Email",
+ "jsFunctionName": "email",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ {
+ "name": "when",
+ "cType": "git_time",
+ "copy": "git_time_dup",
+ "cppFunctionName": "When",
+ "jsFunctionName": "when",
+ "cppClassName": "GitTime",
+ "jsClassName": "Time"
+ }
+ ],
+ "filename": "signature.h",
+ "ignore": false,
+ "cppClassName": "GitSignature",
+ "jsClassName": "Signature",
+ "cType": "git_signature",
+ "description": " An action signature (e.g. for committers, taggers, etc) ",
+ "freeFunctionName": "git_signature_free"
+ },
+ {
+ "cType": null,
+ "filename": "stash.h",
+ "ignore": false,
+ "cppClassName": "GitStash",
+ "jsClassName": "Stash",
+ "dependencies": [
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "status.h",
+ "ignore": false,
+ "cppClassName": "GitStatus",
+ "jsClassName": "Status",
+ "dependencies": [
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "stdint.h",
+ "ignore": false,
+ "cppClassName": "GitStdint",
+ "jsClassName": "Stdint",
+ "dependencies": [
+ "../include/tree.h",
+ "../include/repository.h",
+ "../include/tree_entry.h",
+ "../include/object.h",
+ "../include/treebuilder.h",
+ "../include/oid.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "stdarray.h",
+ "ignore": false,
+ "cppClassName": "GitStdarray",
+ "jsClassName": "Stdarray",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": "git_strarray",
+ "filename": "strarray.h",
+ "ignore": false,
+ "cppClassName": "GitStrarray",
+ "jsClassName": "Strarray",
+ "description": " Array of strings ",
+ "freeFunctionName": "git_strarray_free",
+ "dependencies": [
+ "../include/strarray.h"
+ ],
+ "fields": [
+ {
+ "type": "char **",
+ "name": "strings",
+ "comments": "",
+ "cType": "char **",
+ "cppFunctionName": "Strings",
+ "jsFunctionName": "strings",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ },
+ {
+ "type": "size_t",
+ "name": "count",
+ "comments": "",
+ "cType": "size_t",
+ "cppFunctionName": "Count",
+ "jsFunctionName": "count",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number"
+ }
+ ],
+ "functions": []
+ },
+ {
+ "filename": "submodule.h",
+ "ignore": false,
+ "cppClassName": "GitSubmodule",
+ "jsClassName": "Submodule",
+ "cType": "git_submodule",
+ "description": " Opaque structure representing a submodule.",
+ "freeFunctionName": "git_submodule_free",
+ "dependencies": [
+ "../include/submodule.h",
+ "../include/repository.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "filename": "tag.h",
+ "ignore": false,
+ "cppClassName": "GitTag",
+ "jsClassName": "Tag",
+ "cType": "git_tag",
+ "description": " Parsed representation of a tag object. ",
+ "freeFunctionName": "git_tag_free",
+ "dependencies": [
+ "../include/tag.h",
+ "../include/repository.h",
+ "../include/object.h",
+ "../include/oid.h",
+ "../include/strarray.h"
+ ],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "functions": [
+ {
+ "cFunctionName": "git_threads_init",
+ "ignore": false,
+ "description": "Init the threading system.
\n",
+ "cppFunctionName": "Init",
+ "jsFunctionName": "init",
+ "return": {
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [],
+ "isAsync": false,
+ "comment": "If libgit2 has been built with GIT_THREADS\n on, this function must be called once before\n any other library functions.
\n\nIf libgit2 has been built without GIT_THREADS\n support, this function is a no-op.
\n"
+ }
+ ],
+ "filename": "threads.h",
+ "ignore": false,
+ "cppClassName": "GitThreads",
+ "jsClassName": "Threads",
+ "dependencies": [],
+ "fields": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_time",
+ "fields": [
+ {
+ "name": "time",
+ "cType": "git_time_t",
+ "cppFunctionName": "Time",
+ "jsFunctionName": "time",
+ "cppClassName": "Int32",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "offset",
+ "cType": "int",
+ "cppFunctionName": "Offset",
+ "jsFunctionName": "offset",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ }
+ ],
+ "filename": "time.h",
+ "ignore": false,
+ "cppClassName": "GitTime",
+ "jsClassName": "Time",
+ "description": " Time in a signature ",
+ "dependencies": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "trace.h",
+ "ignore": false,
+ "cppClassName": "GitTrace",
+ "jsClassName": "Trace",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ },
+ {
+ "cType": null,
+ "trim": false,
+ "functions": [
+ {
+ "cFunctionName": "git_cred_ssh_key_from_agent",
+ "ignore": false,
+ "description": "Create a new ssh key credential object used for querying an ssh-agent.\n The supplied credential parameter will be internally duplicated.
\n",
+ "cppFunctionName": "CredSshKeyFromAgent",
+ "jsFunctionName": "credSshKeyFromAgent",
+ "return": {
+ "cType": "int",
+ "comment": " 0 for success or an error code for failure",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_cred **",
+ "cppClassName": "GitCred",
+ "jsClassName": "Cred",
+ "comment": "The newly created credential object.",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "username",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "username to use to authenticate",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": ""
+ }
+ ],
+ "filename": "transport.h",
+ "ignore": false,
+ "cppClassName": "GitTransport",
+ "jsClassName": "Transport",
+ "dependencies": [
+ "../include/cred.h",
+ "../include/transport.h",
+ "../include/remote.h"
+ ],
+ "fields": []
+ },
+ {
+ "functions": [
+ {
+ "cFunctionName": "git_tree_lookup",
+ "ignore": false,
+ "description": "Lookup a tree object from the repository.
\n",
+ "cppFunctionName": "Lookup",
+ "jsFunctionName": "lookup",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_tree **",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "Pointer to the looked up tree",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "The repo to use when locating the tree.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "id",
+ "cType": "const git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "Identity of the tree to locate.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_tree_entrycount",
+ "ignore": false,
+ "description": "Get the number of entries listed in a tree
\n",
+ "cppFunctionName": "Entrycount",
+ "jsFunctionName": "entrycount",
+ "return": {
+ "cType": "size_t",
+ "comment": " the number of entries in the tree",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "tree",
+ "cType": "const git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "a previously loaded tree.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_tree_entry_byname",
+ "ignore": false,
+ "description": "Lookup a tree entry by its filename
\n",
+ "cppFunctionName": "EntryByname",
+ "jsFunctionName": "entryByname",
+ "return": {
+ "cType": "const git_tree_entry *",
+ "comment": " the tree entry; NULL if not found",
+ "cppClassName": "GitTreeEntry",
+ "jsClassName": "TreeEntry"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "tree",
+ "cType": "const git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "a previously loaded tree.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "filename",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "the filename of the desired entry",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.
\n"
+ },
+ {
+ "cFunctionName": "git_tree_entry_byindex",
+ "ignore": false,
+ "description": "Lookup a tree entry by its position in the tree
\n",
+ "cppFunctionName": "EntryByindex",
+ "jsFunctionName": "entryByindex",
+ "return": {
+ "cType": "const git_tree_entry *",
+ "comment": " the tree entry; NULL if not found",
+ "cppClassName": "GitTreeEntry",
+ "jsClassName": "TreeEntry"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "tree",
+ "cType": "const git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "a previously loaded tree.",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "idx",
+ "cType": "size_t",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number",
+ "comment": "the position in the entry list",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.
\n"
+ },
+ {
+ "cFunctionName": "git_tree_entry_bypath",
+ "ignore": false,
+ "description": "Retrieve a tree entry contained in a tree or in any of its subtrees,\n given its relative path.
\n",
+ "cppFunctionName": "EntryBypath",
+ "jsFunctionName": "entryBypath",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 on success; GIT_ENOTFOUND if the path does not exist",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_tree_entry **",
+ "cppClassName": "GitTreeEntry",
+ "jsClassName": "TreeEntry",
+ "comment": "Pointer where to store the tree entry",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "root",
+ "cType": "const git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "Previously loaded tree which is the root of the relative path",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "path",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "Path to the contained entry",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "Unlike the other lookup functions, the returned tree entry is owned by\n the user and must be freed explicitly with git_tree_entry_free().
\n"
+ }
+ ],
+ "filename": "tree.h",
+ "ignore": false,
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "cType": "git_tree",
+ "description": " Representation of a tree object. ",
+ "freeFunctionName": "git_tree_free",
+ "dependencies": [
+ "../include/tree.h",
+ "../include/repository.h",
+ "../include/tree_entry.h",
+ "../include/object.h",
+ "../include/treebuilder.h",
+ "../include/oid.h"
+ ],
+ "fields": []
+ },
+ {
+ "isStruct": true,
+ "cType": "git_treebuilder",
+ "dependencies": [
+ "../include/tree.h",
+ "../include/oid.h"
+ ],
+ "functions": [
+ {
+ "cFunctionName": "git_treebuilder_create",
+ "ignore": false,
+ "description": "Create a new tree builder.
\n",
+ "cppFunctionName": "Create",
+ "jsFunctionName": "create",
+ "return": {
+ "cType": "int",
+ "comment": " 0 on success; error code otherwise",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "isErrorCode": true
+ },
+ "isConstructorMethod": true,
+ "isPrototypeMethod": false,
+ "args": [
+ {
+ "name": "out",
+ "cType": "git_treebuilder **",
+ "cppClassName": "GitTreebuilder",
+ "jsClassName": "Treebuilder",
+ "comment": "Pointer where to store the tree builder",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "source",
+ "cType": "const git_tree *",
+ "cppClassName": "GitTree",
+ "jsClassName": "Tree",
+ "comment": "Source tree to initialize the builder (optional)",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": false,
+ "comment": "The tree builder can be used to create or modify trees in memory and\n write them as tree objects to the database.
\n\nIf the source parameter is not NULL, the tree builder will be\n initialized with the entries of the given tree.
\n\nIf the source parameter is NULL, the tree builder will start with no\n entries and will have to be filled manually.
\n"
+ },
+ {
+ "cFunctionName": "git_treebuilder_insert",
+ "ignore": false,
+ "description": "Add or update an entry to the builder
\n",
+ "cppFunctionName": "Insert",
+ "jsFunctionName": "insert",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "out",
+ "cType": "const git_tree_entry **",
+ "cppClassName": "GitTreeEntry",
+ "jsClassName": "TreeEntry",
+ "comment": "Pointer to store the entry (optional)",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "bld",
+ "cType": "git_treebuilder *",
+ "cppClassName": "GitTreebuilder",
+ "jsClassName": "Treebuilder",
+ "comment": "Tree builder",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "filename",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "Filename of the entry",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "id",
+ "cType": "const git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "SHA1 oid of the entry",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "filemode",
+ "cType": "git_filemode_t",
+ "cppClassName": "Number",
+ "jsClassName": "Number",
+ "comment": "Folder attributes of the entry. This parameter must\n\t\t\tbe valued with one of the following entries: 0040000, 0100644,\n\t\t\t0100755, 0120000 or 0160000.",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false,
+ "additionalCast": "(int)"
+ }
+ ],
+ "isAsync": false,
+ "comment": "Insert a new entry for filename in the builder with the\n given attributes.
\n\nIf an entry named filename already exists, its attributes\n will be updated with the given ones.
\n\nThe optional pointer out can be used to retrieve a pointer to\n the newly created/updated entry. Pass NULL if you do not need it.
\n\nNo attempt is being made to ensure that the provided oid points\n to an existing git object in the object database, nor that the\n attributes make sense regarding the type of the pointed at object.
\n"
+ },
+ {
+ "cFunctionName": "git_treebuilder_remove",
+ "ignore": false,
+ "description": "Remove an entry from the builder by its filename
\n",
+ "cppFunctionName": "Remove",
+ "jsFunctionName": "remove",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": null,
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "bld",
+ "cType": "git_treebuilder *",
+ "cppClassName": "GitTreebuilder",
+ "jsClassName": "Treebuilder",
+ "comment": "Tree builder",
+ "isReturn": true,
+ "isSelf": true,
+ "shouldAlloc": false
+ },
+ {
+ "name": "filename",
+ "cType": "const char *",
+ "cppClassName": "String",
+ "jsClassName": "String",
+ "comment": "Filename of the entry to remove",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": ""
+ },
+ {
+ "cFunctionName": "git_treebuilder_write",
+ "ignore": false,
+ "description": "Write the contents of the tree builder as a tree object
\n",
+ "cppFunctionName": "Write",
+ "jsFunctionName": "write",
+ "return": {
+ "isErrorCode": true,
+ "cType": "int",
+ "comment": " 0 or an error code",
+ "cppClassName": "Number",
+ "jsClassName": "Number"
+ },
+ "isConstructorMethod": false,
+ "isPrototypeMethod": true,
+ "args": [
+ {
+ "name": "id",
+ "cType": "git_oid *",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid",
+ "comment": "Pointer to store the OID of the newly written tree",
+ "isReturn": true,
+ "isSelf": false,
+ "shouldAlloc": true
+ },
+ {
+ "name": "repo",
+ "cType": "git_repository *",
+ "cppClassName": "GitRepository",
+ "jsClassName": "Repository",
+ "comment": "Repository in which to store the object",
+ "isReturn": false,
+ "isSelf": false,
+ "shouldAlloc": false
+ },
+ {
+ "name": "bld",
+ "cType": "git_treebuilder *",
+ "cppClassName": "GitTreebuilder",
+ "jsClassName": "Treebuilder",
+ "comment": "Tree builder to write",
+ "isReturn": false,
+ "isSelf": true,
+ "shouldAlloc": false
+ }
+ ],
+ "isAsync": true,
+ "comment": "The tree builder will be written to the given repo, and its\n identifying SHA1 hash will be stored in the id pointer.
\n"
+ }
+ ],
+ "filename": "treebuilder.h",
+ "ignore": false,
+ "cppClassName": "GitTreebuilder",
+ "jsClassName": "Treebuilder",
+ "description": " Constructor for in-memory trees ",
+ "fields": []
+ },
+ {
+ "isStruct": true,
+ "forwardDeclare": true,
+ "cType": "git_tree_entry",
+ "dependencies": [
+ "../include/tree.h",
+ "../include/types.h",
+ "../include/oid.h"
+ ],
+ "fields": [
+ {
+ "name": "removed",
+ "cType": "uint16_t",
+ "cppFunctionName": "Removed",
+ "jsFunctionName": "removed",
+ "cppClassName": "Integer",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "attr",
+ "cType": "uint16_t",
+ "cppFunctionName": "Attr",
+ "jsFunctionName": "attr",
+ "cppClassName": "Integer",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "oid",
+ "cType": "git_oid",
+ "cppFunctionName": "Oid",
+ "jsFunctionName": "oid",
+ "cppClassName": "GitOid",
+ "jsClassName": "Oid"
+ },
+ {
+ "name": "filename_len",
+ "cType": "size_t",
+ "cppFunctionName": "FilenameLen",
+ "jsFunctionName": "filenameLen",
+ "cppClassName": "Uint32",
+ "jsClassName": "Number"
+ },
+ {
+ "name": "filename",
+ "structType": "char",
+ "structName": "filename[1]",
+ "cType": "char *",
+ "cppFunctionName": "Filename",
+ "jsFunctionName": "filename",
+ "cppClassName": "String",
+ "jsClassName": "String"
+ }
+ ],
+ "filename": "tree_entry.h",
+ "ignore": false,
+ "cppClassName": "GitTreeEntry",
+ "jsClassName": "TreeEntry",
+ "description": " Representation of each one of the entries in a tree object. ",
+ "functions": []
+ },
+ {
+ "cType": null,
+ "filename": "types.h",
+ "ignore": false,
+ "cppClassName": "GitTypes",
+ "jsClassName": "Types",
+ "dependencies": [],
+ "fields": [],
+ "functions": []
+ }
+]
diff --git a/blob.js.html b/blob.js.html
deleted file mode 100644
index 9e56cfb..0000000
--- a/blob.js.html
+++ /dev/null
@@ -1,245 +0,0 @@
-
-
-
-
- Nodegit: Source: blob.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- success = require('./utilities').success;
-
-/**
- * Blob convenience class constructor.
- *
- * @constructor
- * @param {git.raw.Repo} rawRepo Raw repository object.
- * @param {git.raw.Blob} [rawBlob = new git.raw.Blob(rawRepo)] Raw blob object.
- */
-var Blob = function(rawRepo, rawBlob) {
- if(!(rawRepo instanceof git.raw.Repo)) {
- throw new git.error('First parameter for Blob must be a raw repo');
- }
- this.rawRepo = rawRepo;
-
- if(typeof rawBlob !== 'undefined' &&
- rawBlob instanceof git.raw.Blob) {
- this.rawBlob = rawBlob;
- } else {
- this.rawBlob = new git.raw.Blob(this.rawRepo);
- }
-};
-
-/**
- * Retrieve the blob represented by the oid.
- *
- * @param {git.raw.Oid} oid The OID representing the blob to lookup.
- * @param {Blob~lookupCallback} callback
- */
-Blob.prototype.lookup = function(oid, callback) {
- /**
- * @callback Blob~lookupCallback Callback executed on lookup completion.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Blob|null} blob Retrieved blob object or null.
- */
- var self = this;
- self.rawBlob.lookup(self.rawRepo, oid, function blobLookup(error, rawBlob) {
- if (success(error, callback)) {
- self.rawBlob = rawBlob;
- callback(null, self);
- }
- });
-};
-
-/**
- * Retrieve the blob's raw content buffer.
- *
- * @param {Blob~rawContentCallback} callback
- */
-Blob.prototype.rawContent = function(callback) {
- /**
- * @callback Blob~rawContentCallback Callback executed after raw content is retrieved.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Buffer|null} content The raw content of the blob or null.
- */
- this.rawBlob.rawContent(function(error, content) {
- if (success(error, callback)) {
- callback(null, content);
- }
- });
-};
-
-/**
- * Retrieve the blob's content.
- *
- * @param {Blob~contentCallback} callback
- */
-Blob.prototype.content = function(callback) {
- /**
- * @callback Blob~contentCallback Callback executed after content is retrieved.
- * @param {GitError|null} error An Error or null if successful.
- * @param {String|null} content The content of the blob or null.
- */
- this.rawContent(function(error, content) {
- if (success(error, callback)) {
- callback(null, content.toString());
- }
- });
-};
-
-/**
- * Create a new blob from the file at the given path.
- *
- * @param {String} path Full path to the file.
- * @param {Blob~createFromFileCallback} callback
- */
-Blob.prototype.createFromFile = function(path, callback) {
- /**
- * @callback Blob~createFromFileCallback Callback executed after blob is created.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Blob|null} blob The new blob or null.
- */
- var self = this;
- self.rawBlob.createFromFile(path, self.rawRepo, function blobCreateFromFileCallback(error, rawBlob) {
- if (success(error, callback)) {
- self.rawBlob = rawBlob;
- callback(null, self);
- }
- });
-};
-
-/**
- * Create a new blob from the given buffer.
- *
- * @param {Buffer} buffer Buffer used to create blob.
- * @param {Blob~createFromBufferCallback} callback
- */
-Blob.prototype.createFromFile = function(path, callback) {
- /**
- * @callback Blob~createFromBufferCallback Callback executed after blob is created.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Blob|null} content The new blob or null.
- */
- var self = this;
- self.rawBlob.createFromBuffer(buffer, self.rawRepo, function blobCreateFromBufferCallback(error, rawBlob) {
- if (success(error, callback)) {
- self.rawBlob = rawBlob;
- callback(null, self);
- }
- });
-};
-
-exports.blob = Blob;
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/commit.js.html b/commit.js.html
deleted file mode 100644
index 4450c48..0000000
--- a/commit.js.html
+++ /dev/null
@@ -1,478 +0,0 @@
-
-
-
-
- Nodegit: Source: commit.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require( '../' ),
- success = require('./utilities').success,
- events = require('events');
-
-/**
- * Convenience commit constructor.
- *
- * @constructor
- * @param {git.raw.Repo} rawRepo Raw repository object.
- * @param {git.raw.Commit} [rawCommit = new git.raw.Commit(rawRepo)] Raw commit object.
- */
-var Commit = function(rawRepo, rawCommit) {
- if (!(rawRepo instanceof git.raw.Repo)) {
- throw new git.error('First parameter for Commit must be a raw repo');
- }
-
- this.rawRepo = rawRepo;
-
- if (rawCommit instanceof git.raw.Commit) {
- this.rawCommit = rawCommit;
- } else {
- this.rawCommit = new git.raw.Commit();
- }
-};
-
-/**
- * Look up the commit referenced by oid, replace this.commit with the result.
- *
- * @param {Oid|git.raw.Oid|String} oid A representation of an OID used to lookup the commit.
- * @param {Commit~lookupCallback} callback
- */
-Commit.prototype.lookup = function(oid, callback) {
- /**
- * @callback Commit~lookupCallback Callback executed on lookup completion.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Commit|null} commit Retrieved commit object or null.
- */
- if (typeof oid !== 'undefined' &&
- typeof oid !== 'string' &&
- !(oid instanceof git.raw.Oid)) {
- oid = oid.getRawOid();
- }
- var self = this;
- self.rawCommit.lookup(self.rawRepo, oid, function commitLookup(error, rawCommit) {
- if (success(error, callback)) {
- self.rawCommit = rawCommit;
- callback(null, self);
- }
- });
-};
-
-/**
- * Retrieve the commit's OID.
- *
- * @param {Commit~oidCallback} callback
- */
-Commit.prototype.oid = function(callback) {
- /**
- * @callback Commit~oidCallback Callback executed on OID retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Oid|null} commit Retrieved OID object or null.
- */
- callback(null, new git.oid(this.rawCommit.oid()));
-};
-
-/**
- * Retrieve the SHA.
- *
- * @param {Commit~shaCallback} callback
- */
-Commit.prototype.sha = function(callback) {
- /**
- * @callback Commit~shaCallback Callback executed on SHA retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {String|null} sha Retrieved SHA.
- */
- this.oid(function(error, oid) {
- if (!success(error, callback)) {
- return;
- }
- oid.sha(function(error, sha) {
- if (!success(error, callback)) {
- return;
- }
- callback(null, sha);
- });
- });
-};
-
-/**
- * Retrieve the message
- *
- * @param {Commit~messageCallback} callback
- */
-Commit.prototype.message = function(callback) {
- /**
- * @callback Commit~messageCallback Callback executed on message retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {String|null} message Retrieved message.
- */
- this.rawCommit.message(function(error, message) {
- if (success(error, callback)) {
- callback(null, message);
- }
- });
-};
-
-/**
- * Retrieve the commit time as a unix timestamp.
- *
- * @param {Commit~timeCallback} callback
- */
-Commit.prototype.time = function(callback) {
- /**
- * @callback Commit~timeCallback Callback executed on time retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Integer|null} time Retrieved time in seconds.
- */
- this.rawCommit.time(function(error, time) {
- if (success(error, callback)) {
- // git_commit_time returns timestamp in s, converting to ms here
- callback(null, time * 1000);
- }
- });
-};
-
-/**
- * Retrieve the commit time as a Date object.
- *
- * @param {Commit~dateCallback} callback
- */
-Commit.prototype.date = function(callback) {
- /**
- * @callback Commit~dateCallback Callback executed on date retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Date|null} time Retrieved time as a Date object.
- */
- this.time(function(error, time) {
- if (success(error, callback)) {
- callback(null, new Date(time));
- }
- });
-};
-
-/**
- * Retrieve the commit's positive or negative timezone offset, in minutes from UTC.
- *
- * @param {Commit~offsetCallback} callback
- */
-Commit.prototype.offset = function(callback) {
- /**
- * @callback Commit~offsetCallback Callback executed on offset retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Integer|null} offset Retrieved offset in in minutes from UTC.
- */
- this.rawCommit.offset(function(error, offset) {
- if (success(error, callback)) {
- callback(null, offset);
- }
- });
-};
-
-/**
- * Retrieve the commit's author signature.
- *
- * @param {Commit~authorCallback} callback
- */
-Commit.prototype.author = function(callback) {
- /**
- * @callback Commit~authorCallback Callback executed on author retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Signature|null} author Retrieved author signature.
- */
- this.rawCommit.author(function(error, rawSignature) {
- if (success(error, callback)) {
- callback(null, new git.signature(rawSignature));
- }
- });
-};
-
-/**
- * Retrieve the commit's committer.
- *
- * @param {Commit~committerCallback} callback
- */
-Commit.prototype.committer = function(callback) {
- /**
- * @callback Commit~committerCallback Callback executed on committer retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Signature|null} committer Retrieved committer signature.
- */
- this.rawCommit.committer(function(error, rawSignature) {
- if (success(error, callback)) {
- callback(null, new git.signature(rawSignature));
- }
- });
-};
-
-/**
- * Retrieve the tree for this commit.
- *
- * @param {Commit~treeCallback} callback
- */
-Commit.prototype.tree = function(callback) {
- /**
- * @callback Commit~treeCallback Callback executed on tree retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Tree|null} tree Retrieved tree.
- */
- var self = this;
- self.rawCommit.tree(function commitTree(error, rawTree) {
- if (success(error, callback)) {
- callback(null, new git.tree(self.rawRepo, rawTree));
- }
- });
-};
-
-/**
- * Retrieve the file represented by path for this commit.
- * Path must be relative to repository root.
- *
- * @param {String} path
- * @param {Commit~fileCallback} callback
- */
-Commit.prototype.file = function(path, callback) {
- /**
- * @callback Commit~fileCallback Callback executed on file retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Entry|null} file Retrieved file entry.
- */
- this.tree(function commitFileCallback(error, tree) {
- if (!success(error, callback)) {
- return;
- }
- tree.entry(path, function(error, entry) {
- if (success(error, callback)) {
- callback(null, entry);
- }
- });
- });
-};
-
-/**
- * Walk the history from this commit backwards.
- * An EventEmitter is returned that will emit a 'commit' event for each
- * commit in the history, and one 'end' event when the walk is completed.
- *
- * @fires Commit#commit
- * @fires Commit#end
- *
- * @return {EventEmitter} historyWalkEmitter
- */
-Commit.prototype.history = function() {
- var event = new events.EventEmitter(),
- self = this;
-
- self.oid(function commitOid(error, oid) {
- (new git.revwalk(self.rawRepo)).allocate(function createRevwalk(error, revwalk) {
- var commits = [];
- revwalk.walk(oid, function commitRevWalk(error, index, commit, noMoreCommits) {
- if(error) {
- event.emit('end', error, commits);
- return false;
- }
-
- if (noMoreCommits) {
- /**
- * End event.
- *
- * @event Commit#end
- *
- * @param {GitError|null} error An error object if there was an issue, null otherwise.
- * @param {Commit[]} commits The commits.
- */
- event.emit('end', null, commits);
- return;
- }
- /**
- * Commit event.
- *
- * @event Commit#commit
- *
- * @param {GitError|null} error An error object if there was an issue, null otherwise.
- * @param {Commit} commit The commit.
- */
- event.emit('commit', null, commit);
- commits.push(commit);
- });
- });
- });
-
- return event;
-};
-
-/**
- * Retrieve the commit's parents.
- *
- * @param {Commit~parentsCallback} callback
- */
-Commit.prototype.parents = function(callback) {
- /**
- * @callback Commit~parentsCallback Callback executed on parents retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Commit[]|null} parents Commit's parent(s).
- */
- var self = this;
- self.rawCommit.parents(function processParent(error, rawParents) {
- if (success(error, callback)) {
- var parents = [];
- rawParents.forEach(function eachParent(rawParent) {
- parents.push(new Commit(self.rawRepo, rawParent));
- });
- callback(null, parents);
- }
- });
-};
-
-/**
- * Generate an array of diff trees showing changes between this commit
- * and its parent(s).
- *
- * @param {Commit~parentsDiffTreesCallback} callback
- */
-Commit.prototype.parentsDiffTrees = function(callback) {
- /**
- * @callback Commit~parentsDiffTreesCallback Callback executed on diff trees retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {DiffList[]|null} diffLists Array of DiffTrees showing changes between this commit and its parent(s)
- */
- var self = this;
- self.sha(function(error, commitSha) {
- if (!success(error, callback)) {
- return;
- }
- self.parents(function commitParents(error, parents) {
- if (!success(error, callback)) {
- return;
- }
- var parentDiffLists = [];
- parents.forEach(function commitEachParent(parent) {
- parent.sha(function commitParentSha(error, parentSha) {
- (new git.diffList(self.rawRepo)).treeToTree(parentSha, commitSha, function walkDiffList(error, diffList) {
- if (!success(error, callback)) {
- return;
- }
- parentDiffLists.push(diffList);
- if (parentDiffLists.length === parents.length) {
- callback(null, parentDiffLists);
- }
- });
- });
- });
- });
- });
-};
-
-exports.commit = Commit;
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/diff_list.js.html b/diff_list.js.html
deleted file mode 100644
index a4a6eb8..0000000
--- a/diff_list.js.html
+++ /dev/null
@@ -1,286 +0,0 @@
-
-
-
-
- Nodegit: Source: diff_list.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- events = require('events');
-
-/**
- * Convenience diff list class.
- *
- * @constructor
- * @param {git.raw.Repo} rawRepo
- * @param {git.raw.DiffList} [rawDiffList = new git.raw.DiffList]
- */
-var DiffList = function(rawRepo, rawDiffList) {
- if (!(rawRepo instanceof git.raw.Repo)) {
- throw new git.error('First parameter for DiffList must be a raw repo');
- }
- this.rawRepo = rawRepo;
-
- if (rawDiffList instanceof git.raw.DiffList) {
- this.rawDiffList = rawDiffList;
- } else {
- this.rawDiffList = new git.raw.DiffList();
- }
-};
-
-/**
- * Refer to vendor/libgit2/include/git2/diff.h for delta type definitions.
- *
- * @readonly
- * @enum {Integer}
- */
-DiffList.prototype.deltaTypes = {
- /** 0 */ GIT_DELTA_UNMODIFIED: git.raw.DiffList.deltaTypes.GIT_DELTA_UNMODIFIED,
- /** 1 */ GIT_DELTA_ADDED: git.raw.DiffList.deltaTypes.GIT_DELTA_ADDED,
- /** 2 */ GIT_DELTA_DELETED: git.raw.DiffList.deltaTypes.GIT_DELTA_DELETED,
- /** 3 */ GIT_DELTA_MODIFIED: git.raw.DiffList.deltaTypes.GIT_DELTA_MODIFIED,
- /** 4 */ GIT_DELTA_RENAMED: git.raw.DiffList.deltaTypes.GIT_DELTA_RENAMED,
- /** 5 */ GIT_DELTA_COPIED: git.raw.DiffList.deltaTypes.GIT_DELTA_COPIED,
- /** 6 */ GIT_DELTA_IGNORED: git.raw.DiffList.deltaTypes.GIT_DELTA_IGNORED,
- /** 7 */ GIT_DELTA_UNTRACKED: git.raw.DiffList.deltaTypes.GIT_DELTA_UNTRACKED,
- /** 8 */ GIT_DELTA_TYPECHANGE: git.raw.DiffList.deltaTypes.GIT_DELTA_TYPECHANGE
-};
-
-/**
- * Refer to vendor/libgit2/include/git2/diff.h for line origin type definitions.
- *
- * @readOnly
- * @enum {String}
- */
-DiffList.prototype.lineOriginTypes = {
- /** ' ' */ GIT_DIFF_LINE_CONTEXT: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_CONTEXT,
- /** '+' */ GIT_DIFF_LINE_ADDITION: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_ADDITION,
- /** '-' */ GIT_DIFF_LINE_DELETION: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_DELETION,
- /** '\n' */ GIT_DIFF_LINE_ADD_EOFNL: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_ADD_EOFNL,
- /** '' */ GIT_DIFF_LINE_DEL_EOFNL: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_DEL_EOFNL,
- /** 'F' */ GIT_DIFF_LINE_FILE_HDR: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_FILE_HDR,
- /** 'H' */ GIT_DIFF_LINE_HUNK_HDR: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_HUNK_HDR,
- /** 'B' */ GIT_DIFF_LINE_BINARY: git.raw.DiffList.lineOriginTypes.GIT_DIFF_LINE_BINARY
-};
-
-/**
- * Walk the current diff list tree.
- *
- * @fires DiffList#delta
- * @fires DiffList#end
- *
- * @return {EventEmitter} diffListWalkEmitter
- */
-DiffList.prototype.walk = function() {
- var event = new events.EventEmitter(),
- allFileDeltas = [],
- self = this;
-
- self.rawDiffList.walk(function fileCallback(error, fileDeltas) {
- if (error) {
- event.emit('end', new git.error(error.message, error.code), null);
- }
- fileDeltas.forEach(function(fileDelta) {
- /**
- * Delta event.
- *
- * @event DiffList#delta
- *
- * @param {GitError|null} error An error object if there was an issue, null otherwise.
- * @param {FileDelta} fileDelta The file delta object.
- */
- event.emit('delta', null, fileDelta);
- allFileDeltas.push(fileDelta);
- });
- }, function hunkCallback(error, diffHunk) {
- /** TO BE IMPLEMENTED */
- }, function lineCallback(error, diffLine) {
- /** TO BE IMPLEMENTED */
- }, function endCallback(error) {
- /**
- * End event.
- *
- * @event DiffList#end
- *
- * @param {GitError|null} error An error object if there was an issue, null otherwise.
- * @param {FileDelta[]} fileDeltas The file delta objects.
- */
- event.emit('end', error ? new git.error(error.message, error.code) : null, allFileDeltas);
- });
-
- return event;
-};
-
-DiffList.prototype.treeToTree = function(oldSha, newSha, callback) {
- var self = this;
- self.rawDiffList.treeToTree(self.rawRepo, oldSha, newSha, function(error, rawDifflist) {
- if (error) {
- callback(new git.error(error.message, error.code), null);
- return;
- }
- self.rawDiffList = rawDifflist;
- callback(null, self);
- });
-};
-
-exports.diffList = DiffList;
-
-/**
- * @namespace
- * @property {Object} oldFile Contains details for the old file state
- * @property {String} oldFile.path The path to the old file, relative to the repository
- * @property {Object} newFile Contains details for the new file state
- * @property {String} newFile.path The path to the new file, relative to the repository
- * @property {Object[]} content Array of context & differences
- * @property {Object} content[].range
- * @property {Object} content[].range.old
- * @property {Integer} content[].range.old.start
- * @property {Integer} content[].range.old.lines
- * @property {Object} content[].range.new
- * @property {Integer} content[].range.new.start
- * @property {Integer} content[].range.new.lines
- * @property {Object} content[].content Content of the delta
- * @property {DiffList.lineOriginTypes} content[].lineOrigin
- * @property {Integer} content[].contentLength
- * @property {Integer} status Type of delta
- */
-var FileDelta = {
- oldFile: {
- path: String
- },
- newFile: {
- path: String
- },
- content: [
- {
- range: {
- old: {
- start: Number,
- lines: Number
- },
- 'new': {
- start: Number,
- lines: Number
- }
- },
- content: String,
- lineOrigin: String,
- contentLength: Number
- }
- ],
- status: Number
-};
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/error.js.html b/error.js.html
deleted file mode 100644
index f00a3be..0000000
--- a/error.js.html
+++ /dev/null
@@ -1,183 +0,0 @@
-
-
-
-
- Nodegit: Source: error.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- util = require('util');
-
-/**
- * GitError constructor.
- *
- * @constructor
- * @param {String} [message = 'No message'] The error description. Set from giterr_last->message.
- * @param {Integer} [code = git.raw.Error.codes.GITERR_INVALID] The error code. Set from giterr_last->klass
- */
-var GitError = function(message, code) {
- Error.call(this);
- Error.captureStackTrace(this, exports.error);
-
- this.name = 'GitError';
- this.message = message || 'No message';
- this.code = code || git.raw.Error.codes.GITERR_INVALID;
-};
-
-util.inherits(GitError, Error);
-
-/**
- * Refer to vendor/libgit2/include/git2/errors.h for error code definitions.
- *
- * @readonly
- * @enum {Integer}
- */
-GitError.prototype.codes = {
- /** 0 */ GITERR_NOMEMORY: git.raw.Error.codes.GITERR_NOMEMORY,
- /** 1 */ GITERR_OS: git.raw.Error.codes.GITERR_OS,
- /** 2 */ GITERR_INVALID: git.raw.Error.codes.GITERR_INVALID,
- /** 3 */ GITERR_REFERENCE: git.raw.Error.codes.GITERR_REFERENCE,
- /** 4 */ GITERR_ZLIB: git.raw.Error.codes.GITERR_ZLIB,
- /** 5 */ GITERR_REPOSITORY: git.raw.Error.codes.GITERR_REPOSITORY,
- /** 6 */ GITERR_CONFIG: git.raw.Error.codes.GITERR_CONFIG,
- /** 7 */ GITERR_REGEX: git.raw.Error.codes.GITERR_REGEX,
- /** 8 */ GITERR_ODB: git.raw.Error.codes.GITERR_ODB,
- /** 9 */ GITERR_INDEX: git.raw.Error.codes.GITERR_INDEX,
- /** 10 */ GITERR_OBJECT: git.raw.Error.codes.GITERR_OBJECT,
- /** 11 */ GITERR_NET: git.raw.Error.codes.GITERR_NET,
- /** 12 */ GITERR_TAG: git.raw.Error.codes.GITERR_TAG,
- /** 13 */ GITERR_TREE: git.raw.Error.codes.GITERR_TREE
-};
-
-/**
- * Refer to vendor/libgit2/include/git2/errors.h for return code definitions.
- *
- * @readonly
- * @enum {Integer}
- */
-GitError.prototype.returnCodes = {
- /** 0 */ GIT_OK: git.raw.Error.returnCodes.GIT_OK,
- /** -1 */ GIT_ERROR: git.raw.Error.returnCodes.GIT_ERROR,
- /** -3 */ GIT_ENOTFOUND: git.raw.Error.returnCodes.GIT_ENOTFOUND,
- /** -4 */ GIT_EEXISTS: git.raw.Error.returnCodes.GIT_EEXISTS,
- /** -5 */ GIT_EAMBIGUOUS: git.raw.Error.returnCodes.GIT_EAMBIGUOUS,
- /** -6 */ GIT_EBUFS: git.raw.Error.returnCodes.GIT_EBUFS,
- /** -30 */ GIT_PASSTHROUGH: git.raw.Error.returnCodes.GIT_PASSTHROUGH,
- /** -31 */ GIT_ITEROVER: git.raw.Error.returnCodes.GIT_ITEROVER
-};
-
-exports.error = GitError;
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/global.html b/global.html
deleted file mode 100644
index 7ed1cec..0000000
--- a/global.html
+++ /dev/null
@@ -1,500 +0,0 @@
-
-
-
-
- Nodegit: Global
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Methods
-
-
-
-
- repo(directory, callback) → {Repo |null}
-
-
-
-
-
-
-
- Create a new Repo object. If directory is not provided, simply return it.
-Otherwise open the repo asynchronously.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- directory
-
-
-
-
-
-String
-|
-
-null
-
-
-
-
-
-
-
-
-
- The directory for the git repo to open. Null
- if one does not want to open a repo.
-
-
-
-
-
-
- callback
-
-
-
-
-
-repoCallback
-|
-
-null
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- The Repo if no directory is provided, else undefined.
-
-
-
-
-
-
- Type
-
-
-
-Repo
-|
-
-null
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Type Definitions
-
-
-
-
- repoCallback(error, repo)
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- error
-
-
-
-
-
-GitError
-|
-
-null
-
-
-
-
-
-
-
-
-
- An Error or null if successful.
-
-
-
-
-
-
- repo
-
-
-
-
-
-Repo
-|
-
-null
-
-
-
-
-
-
-
-
-
- Opened repository.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/img/boston.gif b/img/boston.gif
deleted file mode 100644
index 595ae27..0000000
Binary files a/img/boston.gif and /dev/null differ
diff --git a/img/nodegit.svg b/img/nodegit.svg
new file mode 100644
index 0000000..9560324
--- /dev/null
+++ b/img/nodegit.svg
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/img/nz.png b/img/nz.png
deleted file mode 100644
index 0330573..0000000
Binary files a/img/nz.png and /dev/null differ
diff --git a/index.html b/index.html
index 66d9276..fafd21d 100644
--- a/index.html
+++ b/index.html
@@ -1,237 +1,249 @@
-
+
-
+
- Nodegit: Index
+
-
+ NodeGit: Native Node bindings to Git.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Version 0.0.79 Node.js libgit2 asynchronous native bindings
-
-A collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.
-
-require
-
-
-
-install
-
-npm install nodegit
-
-use
-
-emulate git log
-
-// Load in the module.
-var git = require('nodegit'),
- async = require('async');
-
-// Open the repository in the current directory.
-git.repo('.git', function(error, repository) {
- if (error) throw error;
-
- // Use the master branch (a branch is the HEAD commit)
- repository.branch('master', function(error, branch) {
- if (error) throw error;
-
- // History returns an event, and begins walking the history
- var history = branch.history();
-
- // History emits 'commit' event for each commit in the branch's history
- history.on('commit', function(error, commit) {
- // Print out `git log` emulation.
- async.series([
- function(callback) {
- commit.sha(callback);
- },
- function(callback) {
- commit.date(callback);
- },
- function(callback) {
- commit.author(function(error, author) {
- author.name(callback);
- });
- },
- function(callback) {
- commit.author(function(error, author) {
- author.email(callback);
- });
- },
- function(callback) {
- commit.message(callback);
- }
- ], function printCommit(error, results) {
- if (error) throw error;
- console.log('SHA ' + results[0]);
- console.log(results[1] * 1000);
- console.log(results[2] + ' <' + results[3] + '>');
- console.log(results[4]);
- });
- });
- });
-});
-
-view commit tree and blob information
-
-// Load in the module.
-var git = require('nodegit');
-
-// Open the repository in the current directory.
-git.repo('.git', function(error, repository) {
- if (error) throw error;
-
- // Use the master branch.
- repository.branch('master', function(error, branch) {
- if (error) throw error;
-
- // Iterate over the revision history.
- branch.tree(function(error, tree) {
- if (error) throw error;
- tree.walk().on('entry', function(error, entry) {
- entry.name(function(error, name) {
- console.log(name);
- });
+
+
+
+
+
+
+
+
+
+
+
+
+
About NodeGit
+
Asynchronous native Node bindings to the libgit2 project.
+
Version 0.1.0 |
+
GitHub repository
+
+
+
+
+
+
+
+
Install:
+
+npm install nodegit
+
Clone and read example:
+
+var clone = require("nodegit").Clone.clone;
+
+// Clone a given repository into a tmp folder.
+clone("git://github.com/nodegit/nodegit", "tmp").then(function(repo) {
+ // Use a known commit sha from this repository.
+ var sha = "59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5";
+
+ // Look up this known commit.
+ repo.getCommit(sha).then(function(commit) {
+ // Look up a specific file within that commit.
+ commit.getEntry("README.md").then(function(entry) {
+ // Get the blob contents from the file.
+ entry.getBlob().then(function(blob) {
+ // Show the name, sha, and filesize in byes.
+ console.log(entry.filename(), entry.sha(), blob.rawsize());
+
+ // Show a spacer.
+ console.log(Array(72).join("=") + "\n\n");
+
+ // Show the entire file.
+ console.log(String(blob));
});
});
});
-});
-
-
download
-
-
You can download this project in either zip or tar formats.
-
-
You can also clone and build the project with Git by running:
-
-
$ git clone git://github.com/tbranyen/nodegit
-
-$ cd nodegit
-
-$ node install
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
+});
+
+
API Documentation
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
diff --git a/index.md b/index.md
deleted file mode 100644
index dfa1960..0000000
--- a/index.md
+++ /dev/null
@@ -1,107 +0,0 @@
-Version **0.0.79** Node.js libgit2 asynchronous native bindings
-
-A collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.
-
-#### require
-
-* [Node.js >=0.8](http://nodejs.org/)
-* [npm](http://npmjs.org/) *(if you want the premiere install experience)*
-* [Git](http://git-scm.com/) *(if you want to unit test )*
-
-#### install
-
- npm install nodegit
-
-
-
-#### use
-
-*emulate git log*
-
- // Load in the module.
- var git = require('nodegit'),
- async = require('async');
-
- // Open the repository in the current directory.
- git.repo('.git', function(error, repository) {
- if (error) throw error;
-
- // Use the master branch (a branch is the HEAD commit)
- repository.branch('master', function(error, branch) {
- if (error) throw error;
-
- // History returns an event, and begins walking the history
- var history = branch.history();
-
- // History emits 'commit' event for each commit in the branch's history
- history.on('commit', function(error, commit) {
- // Print out `git log` emulation.
- async.series([
- function(callback) {
- commit.sha(callback);
- },
- function(callback) {
- commit.date(callback);
- },
- function(callback) {
- commit.author(function(error, author) {
- author.name(callback);
- });
- },
- function(callback) {
- commit.author(function(error, author) {
- author.email(callback);
- });
- },
- function(callback) {
- commit.message(callback);
- }
- ], function printCommit(error, results) {
- if (error) throw error;
- console.log('SHA ' + results[0]);
- console.log(results[1] * 1000);
- console.log(results[2] + ' <' + results[3] + '>');
- console.log(results[4]);
- });
- });
- });
- });
-
-
-*view commit tree and blob information*
-
- // Load in the module.
- var git = require('nodegit');
-
- // Open the repository in the current directory.
- git.repo('.git', function(error, repository) {
- if (error) throw error;
-
- // Use the master branch.
- repository.branch('master', function(error, branch) {
- if (error) throw error;
-
- // Iterate over the revision history.
- branch.tree(function(error, tree) {
- if (error) throw error;
- tree.walk().on('entry', function(error, entry) {
- entry.name(function(error, name) {
- console.log(name);
- });
- });
- });
- });
- });
-
-
-#### download
-
-You can download this project in either [zip](http://github.com/tbranyen/nodegit/zipball/master) or [tar](http://github.com/tbranyen/nodegit/tarball/master) formats.
-
-You can also clone and build the project with [Git](http://git-scm.com) by running:
-
- $ git clone git://github.com/tbranyen/nodegit
-
- $ cd nodegit
-
- $ node install
diff --git a/oid.js.html b/oid.js.html
deleted file mode 100644
index e52ecd1..0000000
--- a/oid.js.html
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-
-
Nodegit: Source: oid.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- success = require('./utilities').success;
-
-/**
- * Convenience Oid constructor.
- *
- * @constructor
- * @param {git.raw.Oid} [rawOid = new git.rawOid] Raw Oid object.
- */
-var Oid = function(rawOid) {
- if(rawOid instanceof git.raw.Oid) {
- this.rawOid = rawOid;
- } else {
- this.rawOid = new git.raw.Oid();
- }
-};
-
-/**
- * @return {git.raw.Oid} The wrapped raw Oid object.
- */
-Oid.prototype.getRawOid = function() {
- return this.rawOid;
-};
-
-/**
- * Create Oid object from string.
- *
- * @param {String} sha
- * @param {Oid~fromStringCallback} callback
- */
-Oid.prototype.fromString = function(sha, callback) {
- /**
- * @callback Oid~fromStringCallback Callback executed after raw Oid is created.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Oid|null} oid The new Oid object.
- */
- var self = this;
- self.rawOid.fromString(sha, function(error, rawOid) {
- if (success(error, callback)) {
- self.rawOid = rawOid;
- callback(null, self);
- }
- });
-};
-
-/**
- * Convert the raw Oid to a SHA
- *
- * @param {Oid~shaCallback} callback
- */
-Oid.prototype.sha = function(callback) {
- /**
- * @callback Oid~shaCallback Callback executed after SHA is retrieved.
- * @param {GitError|null} error An Error or null if successful.
- * @param {String|null} sha The SHA.
- */
- callback(null, this.rawOid.sha());
-};
-
-exports.oid = Oid;
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rebuild-docs.sh b/rebuild-docs.sh
deleted file mode 100755
index 192a32d..0000000
--- a/rebuild-docs.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-jsdoc lib -d . \
- -t jsdoc-template
- index.md
diff --git a/reference.js.html b/reference.js.html
deleted file mode 100644
index 4710fcb..0000000
--- a/reference.js.html
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
Nodegit: Source: reference.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- success = require('./utilities').success;
-
-/**
- * Convenience reference constructor.
- *
- * @constructor
- * @param {git.raw.Repo} rawRepo
- * @param {git.raw.Reference} [rawReference = new git.raw.Reference()]
- */
-var Reference = function(rawRepo, rawReference) {
- if (!(rawRepo instanceof git.raw.Repo)) {
- throw new git.error('First parameter for Reference must be a raw repo');
- }
- this.rawRepo = rawRepo;
-
- if (rawReference instanceof git.raw.Reference) {
- this.rawReference = rawReference;
- } else {
- this.rawReference = new git.raw.Reference(this.rawRepo);
- }
-};
-
-/**
- * Lookup the reference with the given name.
- *
- * @param {String} name
- * @param {Reference~lookupCallback} callback
- */
-Reference.prototype.lookup = function(name, callback) {
- /**
- * @callback Reference~lookupCallback Callback executed on lookup completion.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Reference|null} reference Retrieved reference object or null.
- */
- var self = this;
- self.rawReference.lookup(self.rawRepo, name, function referenceLookup(error, rawReference) {
- if (!success(error, callback)) {
- return;
- }
- self.rawReference = rawReference;
- callback(null, self);
- });
-};
-
-/**
- * Get the Oid representing this reference.
- *
- * @param {Reference~oidCallback} callback
- */
-Reference.prototype.oid = function(callback) {
- /**
- * @callback Reference~oidCallback Callback executed on oid retrieval.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Oid|null} oid Retrieved Oid object or null.
- */
- this.rawReference.oid(function referenceOid(error, rawOid) {
- if (success(error, callback)) {
- callback(null, new git.oid(rawOid));
- }
- });
-};
-
-exports.reference = Reference;
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/repo.js.html b/repo.js.html
deleted file mode 100644
index 83f87a7..0000000
--- a/repo.js.html
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
-
-
Nodegit: Source: repo.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- success = require('./utilities').success;
-
-/**
- * Convenience repository class.
- *
- * @constructor
- */
-var Repo = function() {
- this.rawRepo = new git.raw.Repo();
-};
-
-/**
- * Open the git repository at directory.
- *
- * @example
- * git.repo('/path/to/repository/.git', function(error, repo) { });
- *
- * @param {String} directory The .git directory for the repository to open.
- * @param {Repo~openCallback} callback
- */
-Repo.prototype.open = function(directory, callback) {
- /**
- * @callback Repo~openCallback Callback executed when repository is opened.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Repo|null} repo Opened repository.
- */
- if (typeof callback !== 'function') {
- throw new git.error('Callback is required and must be a Function');
- }
- var self = this;
- self.rawRepo.open(directory, function openRepository(error, rawRepo) {
- if (success(error, callback)) {
- self.rawRepo = rawRepo;
- callback(null, self);
- }
- });
-};
-
-/**
- * Look up a branch's most recent commit.
- *
- * @param {String} name Branch name, e.g. 'master'
- * @param {Repo~branchCallback} callback
- */
-Repo.prototype.branch = function(name, callback) {
- /**
- * @callback Repo~branchCallback Callback executed when the branch is checked out.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Commit|null} repo HEAD commit for the branch.
- */
- var self = this;
- (new git.reference(self.rawRepo)).lookup('refs/heads/' + name, function referenceLookupCallback(error, reference) {
- if (!success(error, callback)) {
- return;
- }
- reference.oid(function oidCallback(error, oid) {
- if (!success(error, callback)) {
- return;
- }
- self.commit(oid, function commitLookupCallback(error, commit) {
- if (!success(error, callback)) {
- return;
- }
- callback(null, commit);
- });
- });
- });
-};
-
-/**
- * Retrieve the commit identified by oid.
- *
- * @param {String|Oid|git.raw.Oid} sha
- * @param {Repo~commitCallback} callback
- */
-Repo.prototype.commit = function(sha, callback) {
- /**
- * @callback Repo~commitCallback Callback executed when the commit is looked up.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Commit|null} commit Commit represented by sha.
- */
- (new git.commit(this.rawRepo)).lookup(sha, function(error, commit) {
- if (success(error, callback)) {
- callback(null, commit);
- }
- });
-};
-
-/**
- * Initialise a git repository at directory.
- *
- * @param {String} directory
- * @param {Boolean} isBare True if the repository is to be bare, false otherwise.
- * @param {Repo~initCallback} callback
- */
-Repo.prototype.init = function(directory, isBare, callback) {
- /**
- * @callback Repo~initCallback Callback executed when repository is initialized.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Repo|null} repo Initialized repository.
- */
- var self = this;
- self.rawRepo.init(directory, isBare, function(error, rawRepo) {
- if (success(error, callback)) {
- self.rawRepo = rawRepo;
- callback(null, self);
- }
- });
-};
-
-/**
- * Create a new Repo object. If directory is not provided, simply return it.
- * Otherwise open the repo asynchronously.
- *
- * @param {String|null} directory The directory for the git repo to open. Null
- * if one does not want to open a repo.
- * @param {repoCallback|null} callback
- * @return {Repo|null} The Repo if no directory is provided, else undefined.
- */
-exports.repo = function(directory, callback) {
- /**
- * @callback repoCallback Callback executed if repository is opened.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Repo|null} repo Opened repository.
- */
- var repo = new Repo();
- if (typeof directory === 'undefined') {
- return repo;
- }
- repo.open(directory, callback);
-};
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/revwalk.js.html b/revwalk.js.html
deleted file mode 100644
index 1381a43..0000000
--- a/revwalk.js.html
+++ /dev/null
@@ -1,211 +0,0 @@
-
-
-
-
-
Nodegit: Source: revwalk.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- success = require('./utilities').success;
-
-/**
- * Convenience revision walking class
- *
- * @constructor
- * @param {git.raw.Repo} rawRepo
- * @param {git.raw.RevWalk|null} rawRevWalk
- */
-var RevWalk = function(rawRepo, rawRevWalk) {
- if (!(rawRepo instanceof git.raw.Repo)) {
- throw new git.error('First parameter for RevWalk must be a raw repo');
- }
- this.rawRepo = rawRepo;
-
- if (typeof rawRevWalk !== 'undefined' &&
- rawRevWalk instanceof git.raw.RevWalk) {
- this.rawRevWalk = rawRevWalk;
- } else {
- this.rawRevWalk = new git.raw.RevWalk(rawRepo);
- }
-};
-
-/**
- * Allocate new revwalker.
- *
- * @param {Function} callback
- */
-RevWalk.prototype.allocate = function(callback) {
- var self = this;
- self.rawRevWalk.allocate(function revwalkAllocate(error, rawRevwalk) {
- if (success(error, callback)) {
- self.rawRevwalk = rawRevwalk;
- callback(null, self);
- }
- });
-};
-
-/**
- * Walk the history from the given oid.
- *
- * @param {Oid} oid
- * @param {Function} callback Callback accepting the following arguments:
- * error, index, commit, noMoreCommits
- */
-RevWalk.prototype.walk = function(oid, callback) {
- var self = this;
- self.rawRevWalk.push(oid.getRawOid(), function revWalkPush(error) {
- if (!success(error, callback)) {
- return;
- }
-
- var shouldContinue = true, index = 0;
-
- function walk() {
- if(!shouldContinue) {
- return;
- }
-
- self.rawRevWalk.next(function revWalkNext(error, oid, walkOver) {
- if(error) {
- callback(new git.error(error.message, error.code), index, commit);
- return;
- }
-
- // Finished walking history, apply callback with noMoreCommits = true
- if (walkOver) {
- callback(null, index, null, walkOver);
- return;
- }
-
- (new git.commit(self.rawRepo)).lookup(oid, function revWalkCommitLookup(error, commit) {
- if(error) {
- callback(new git.error(error.message, error.code), index, commit);
- return;
- }
- if(callback(null, index, commit) === false) {
- shouldContinue = false;
- }
- index++;
- walk();
- });
- });
- }
- walk();
- });
-};
-
-exports.revwalk = RevWalk;
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/scripts/api.js b/scripts/api.js
new file mode 100644
index 0000000..9000351
--- /dev/null
+++ b/scripts/api.js
@@ -0,0 +1,99 @@
+(function(window) {
+ "use strict";
+
+ // Handle search.
+ var search = document.querySelector("input[type=search]");
+
+ function getAPI(version) {
+ return $.getJSON("/api-viewer/versions/" + version + ".json");
+ }
+
+ getAPI("wip").then(function(resp) {
+ var listApi = $("#list-api");
+ var content = $(".api-content");
+ var scrollable = listApi.find(".scrollable");
+
+ var contentTemplate = combyne($(".api-content script").eq(1).html().trim());
+
+ contentTemplate.registerFilter("realArgs", function(args) {
+ return args.filter(function(arg) {
+ return !arg.isSelf && !arg.isReturn;
+ }).map(function(arg, val, all) {
+ arg.length = all.length;
+ return arg;
+ });
+ });
+
+ contentTemplate.registerFilter("addComma", function(value, arg, index) {
+ if (index === arg.length -1) {
+ return value;
+ }
+ else {
+ return value + ", ";
+ }
+ });
+
+ contentTemplate.registerFilter("toCamelCase", function(value) {
+ return value[0].toLowerCase() + value.slice(1);
+ });
+
+ resp.forEach(function(ctor) {
+ // Add nav entry.
+ var anchor = $("
" + ctor.jsClassName + " ").appendTo(scrollable);
+
+ // Add new content.
+ var contentOutput = contentTemplate.render(ctor);
+
+ content.append(contentOutput);
+
+ ctor.functions.forEach(function(func) {
+ var isPrototype = func.isPrototypeMethod ? "#" : ".";
+ anchor.find(".subnav").append("
" + ctor.jsClassName + isPrototype + func.jsFunctionName + " ");
+ });
+ });
+
+ // Size the navigation bar correctly.
+ scrollable.height($("html").innerHeight() - 230);
+
+ $(window).on("resize", function() {
+ scrollable.height($("html").innerHeight() - 230);
+ });
+
+ var windowHeight = $(window).height();
+
+ // Store the url to match against.
+ var elms = $(".about, .inner-content, .inner-block li, h4[id]").each(function() {
+ $(this).data({
+ url: "#" + (this.id || ""),
+ top: $(this).offset().top
+ });
+ });
+
+ var children = listApi.find("a");
+
+ $(document).on("scroll ready", _.throttle(function() {
+ var doc = $(this);
+
+ elms.each(function() {
+ var pos = doc.scrollTop();
+ var el = $(this);
+
+ if (el.data("top") > pos && el.data("top") < pos + (windowHeight / 2)) {
+ children.removeClass("active");
+
+ var active = children.filter("[href='" + el.data("url") + "']");
+
+ active.addClass("active").parents(elms).addClass("active");
+ }
+ });
+ }, 50));
+
+ // Highlight the new code blocks.
+ Prism.highlightAll();
+
+ listApi.on("click", "a", function(ev) {
+ listApi.find("a").removeClass("active");
+ $(this).addClass("active");
+ });
+ });
+})(this);
diff --git a/scripts/demo.js b/scripts/demo.js
new file mode 100644
index 0000000..5ba88a8
--- /dev/null
+++ b/scripts/demo.js
@@ -0,0 +1,74 @@
+// Create the scope with defaults.
+(function(window) {
+ "use strict";
+
+ // DOM elements.
+ var demo = document.querySelector(".demo");
+
+ // Create a livelist of command elements.
+ var commands = demo.getElementsByClassName("command");
+
+ var handleClick = function(evt) {
+ var command = lastCommand();
+ command.focus();
+
+ var range = document.createRange();
+ range.selectNodeContents(command);
+ range.collapse(false);
+
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+ };
+
+ var handleKeyPress = function(evt) {
+ if (evt.keyCode !== 13) {
+ return false;
+ }
+
+ // Remove the current command's editable ability.
+ lastCommand().removeAttribute("contenteditable");
+
+ // Parse and handle the command.
+ parseCommand();
+ };
+
+ var parseCommand = function() {
+ var command = lastCommand().innerText;
+
+ if (command.indexOf("git") === -1) {
+ addCommand("command error", command + " is not a valid command.", false);
+ }
+
+ addCommand("command", "", true);
+ };
+
+ var addCommand = function(type, message, editable) {
+ // Create the new command line.
+ var command = document.createElement("div");
+ command.className = type;
+
+ // Add the new command.
+ demo.appendChild(command);
+
+ // Set message.
+ command.innerText = message;
+
+ if (editable) {
+ command.setAttribute("contenteditable", true);
+
+ // Set focus.
+ setTimeout(function() {
+ command.innerText = command.innerText;
+ command.focus();
+ }, 100);
+ }
+ };
+
+ var lastCommand = function() {
+ return commands[commands.length - 1];
+ };
+
+ demo.addEventListener("click", handleClick, true);
+ demo.addEventListener("keypress", handleKeyPress, true);
+})(this);
diff --git a/scripts/highlight.pack.js b/scripts/highlight.pack.js
deleted file mode 100644
index 6da5ed6..0000000
--- a/scripts/highlight.pack.js
+++ /dev/null
@@ -1 +0,0 @@
-var hljs=new function(){var p={};var a={};function n(c){return c.replace(/&/gm,"&").replace(//gm,">")}function k(s,r){if(!s){return false}for(var c=0;c
"}function B(C){return""+C.nodeName.toLowerCase()+">"}while(z.length||A.length){var w=v().splice(0,1)[0];x+=n(y.substr(s,w.offset-s));s=w.offset;if(w.event=="start"){x+=t(w.node);u.push(w.node)}else{if(w.event=="stop"){var r=u.length;do{r--;var c=u[r];x+=B(c)}while(c!=w.node);u.splice(r,1);while(r'+n(M[0])+""}else{O+=n(M[0])}R=Q.lR.lastIndex;M=Q.lR.exec(N)}O+=n(N.substr(R,N.length-R));return O}function L(r,N){if(N.subLanguage&&a[N.subLanguage]){var M=g(N.subLanguage,r);u+=M.keyword_count;C+=M.r;return M.value}else{return G(r,N)}}function J(N,r){var M=N.nM?"":'';if(N.rB){s+=M;N.buffer=""}else{if(N.eB){s+=n(r)+M;N.buffer=""}else{s+=M;N.buffer=r}}D[D.length]=N}function F(M,O,R){var P=D[D.length-1];if(R){s+=L(P.buffer+M,P);return false}var S=A(O,P);if(S){s+=L(P.buffer+M,P);J(S,O);C+=S.r;return S.rB}var r=x(D.length-1,O);if(r){var T=P.nM?"":" ";if(P.rE){s+=L(P.buffer+M,P)+T}else{if(P.eE){s+=L(P.buffer+M,P)+T+n(O)}else{s+=L(P.buffer+M+O,P)+T}}while(r>1){T=D[D.length-2].nM?"":"";s+=T;r--;D.length--}var Q=D[D.length-1];D.length--;D[D.length-1].buffer="";if(Q.starts){for(var N=0;N1){throw"Illegal"}return{language:K,r:C,keyword_count:u,value:s}}catch(H){if(H=="Illegal"){return{language:null,r:0,keyword_count:0,value:n(E)}}else{throw H}}}function i(){function r(y,x){if(y.compiled){return}if(y.b){y.bR=e(x,"^"+y.b)}if(y.e){y.eR=e(x,"^"+y.e)}if(y.i){y.iR=e(x,"^(?:"+y.i+")")}if(y.r==undefined){y.r=1}if(!y.displayClassName){y.displayClassName=y.cN}if(!y.cN){y.nM=true}for(var w in y.k){if(!y.k.hasOwnProperty(w)){continue}if(y.k[w] instanceof Object){y.keywordGroups=y.k}else{y.keywordGroups={keyword:y.k}}break}y.sm=[];if(y.c){for(var v=0;vz.keyword_count+z.r){z=w}if(w.keyword_count+w.r>y.keyword_count+y.r){z=y;y=w}}}var u=v.className;if(!u.match(y.language)){u=u?(u+" "+y.language):y.language}var c=d(v);if(c.length){var s=document.createElement("pre");s.innerHTML=y.value;y.value=m(c,d(s),C)}if(A){y.value=y.value.replace(/^((<[^>]+>|\t)+)/gm,function(D,G,F,E){return G.replace(/\t/g,A)})}if(r){y.value=y.value.replace(/\n/g," ")}if(/MSIE [678]/.test(navigator.userAgent)&&v.tagName=="CODE"&&v.parentNode.tagName=="PRE"){var s=v.parentNode;var x=document.createElement("div");x.innerHTML=""+y.value+" ";v=x.firstChild.firstChild;x.firstChild.cN=s.cN;s.parentNode.replaceChild(x.firstChild,s)}else{v.innerHTML=y.value}v.className=u;v.dataset={};v.dataset.result={language:y.language,kw:y.keyword_count,re:y.r};if(z&&z.language){v.dataset.second_best={language:z.language,kw:z.keyword_count,re:z.r}}}function l(){if(l.called){return}l.called=true;f();if(arguments.length){for(var c=0;c|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:["escape"],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:["escape"],r:0};this.BE={cN:"escape",b:"\\\\.",e:this.IMR,nM:true,r:0};this.CLCM={cN:"comment",b:"//",e:"$",r:0};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NUMBER_MODE={cN:"number",b:this.NR,e:this.IMR,r:0};this.CNM={cN:"number",b:this.CNR,e:this.IMR,r:0};this.inherit=function(c,t){var s={};for(var r in c){s[r]=c[r]}if(t){for(var r in t){s[r]=t[r]}}return s}}();var initHighlightingOnLoad=hljs.initHighlightingOnLoad;hljs.LANGUAGES.javascript={dM:{l:[hljs.UIR],c:["string","comment","number","regexp_container","function"],k:{keyword:{"in":1,"if":1,"for":1,"while":1,"finally":1,"var":1,"new":1,"function":1,"do":1,"return":1,"void":1,"else":1,"break":1,"catch":1,"instanceof":1,"with":1,"throw":1,"case":1,"default":1,"try":1,"this":1,"switch":1,"continue":1,"typeof":1,"delete":1},literal:{"true":1,"false":1,"null":1}}},m:[hljs.CLCM,hljs.CBLCLM,hljs.CNM,hljs.ASM,hljs.QSM,hljs.BE,{cN:"regexp_container",b:"("+hljs.RSR+"|case|return|throw)\\s*",e:hljs.IMR,nM:true,l:[hljs.IR],k:{"return":1,"throw":1,"case":1},c:["comment",{cN:"regexp",b:"/.*?[^\\\\/]/[gim]*",e:hljs.IMR}],r:0},{cN:"function",b:"\\bfunction\\b",e:"{",l:[hljs.UIR],k:{"function":1},c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*",e:hljs.IMR},{cN:"params",b:"\\(",e:"\\)",c:["string","comment"]}]}]};
\ No newline at end of file
diff --git a/scripts/prism.js b/scripts/prism.js
new file mode 100644
index 0000000..e19d990
--- /dev/null
+++ b/scripts/prism.js
@@ -0,0 +1,5 @@
+/* http://prismjs.com/download.html?themes=prism&languages=clike+javascript+bash */
+self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{};var Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(!(d instanceof a)){c.lastIndex=0;var m=c.exec(d);if(m){u&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),N=[p,1];b&&N.push(b);var O=new a(l,g?t.tokenize(m,g):m,h);N.push(O),w&&N.push(w),Array.prototype.splice.apply(r,N)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if("string"==typeof e)return e;if("[object Array]"==Object.prototype.toString.call(e))return e.map(function(t){return n.stringify(t,a,e)}).join("");var i={type:e.type,content:n.stringify(e.content,a,r),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:r};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var l="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}t.hooks.run("wrap",i);var o="";for(var s in i.attributes)o+=s+'="'+(i.attributes[s]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'" '+o+">"+i.content+""+i.tag+">"},!self.document)return self.addEventListener?(self.addEventListener("message",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code;self.postMessage(JSON.stringify(t.util.encode(t.tokenize(r,t.languages[a])))),self.close()},!1),self.Prism):self.Prism;var a=document.getElementsByTagName("script");return a=a[a.length-1],a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism);;
+Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//g,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*?(\r?\n|$)/g,lookbehind:!0}],string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/gi,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/gi,inside:{punctuation:/\(/}},number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
+Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var git = require('../'),
- success = require('./utilities').success,
- events = require('events');
-
-/**
- * Tree convenience class constructor.
- *
- * @constructor
- * @param {git.raw.Repo} rawRepo Raw repository object.
- * @param {git.raw.Tree} [rawTree = new git.raw.Tree(rawRepo)] Raw tree object.
- */
-var Tree = function(rawRepo, rawTree) {
- if(!(rawRepo instanceof git.raw.Repo)) {
- throw new git.error('First parameter for Tree must be a raw repo');
- }
- this.rawRepo = rawRepo;
-
- if(rawTree instanceof git.raw.Tree) {
- this.rawTree = rawTree;
- } else {
- this.rawTree = new git.raw.Tree(rawRepo);
- }
-};
-
-/**
- * Retrieve the raw tree identified by the given Oid.
- *
- * @param {Oid} oid The Oid identifying a tree.
- * @param {Tree~lookupCallback} callback
- */
-Tree.prototype.lookup = function(oid, callback) {
- /**
- * @callback Tree~lookupCallback Callback executed when the tree is retrieved.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Tree|null} tree The tree object or null.
- */
- var self = this;
- self.rawTree.lookup(oid.getRawOid(), self.rawRepo, function(error, rawTree) {
- if (success(error, callback)) {
- self.rawTree = rawTree;
- callback(null, self);
- }
- });
-};
-
-/**
- * Retrieve the entry by path.
- *
- * @param {String} path Path to the tree entry, relative to repository root.
- * @param {Tree~entryCallback} callback
- */
-Tree.prototype.entry = function(path, callback) {
- /**
- * @callback Tree~entryCallback Callback executed when an entry is retrieved.
- * @param {GitError|null} error An Error or null if successful.
- * @param {Entry|null} entry The tree entry object or null.
- */
- var self = this;
- self.rawTree.entryByPath(path, function(error, rawEntry) {
- if (success(error, callback)) {
- callback(null, new git.entry(self.rawRepo, rawEntry));
- }
- });
-};
-
-/**
- * Walk the tree.
- *
- * @fires Tree#entry
- * @fires Tree#end
- *
- * @param {Boolean} [blobsOnly = true] True to emit only blob & blob executable entries.
- *
- * @return {EventEmitter}
- */
-Tree.prototype.walk = function(blobsOnly) {
- blobsOnly = typeof blobsOnly === 'undefined' ? true : blobsOnly;
-
- var self = this,
- event = new events.EventEmitter(),
- entries = [];
-
- var total = 0;
-
- self.rawTree.walk(blobsOnly, function treeWalkEntries(error, rawEntries) {
- rawEntries.forEach(function treeWalkEntryEmitter(rawEntry) {
- var entry = new git.entry(self.rawRepo, rawEntry);
- entries.push(entry);
- /**
- * Entry event.
- *
- * @event Tree#entry
- *
- * @param {GitError|null} error An error object if there was an issue, null otherwise.
- * @param {Entry} entry The tree entry.
- */
- event.emit('entry', null, entry);
- });
- }, function treeWalkEnd(error) {
- /**
- * End event.
- *
- * @event Tree#end
- *
- * @param {GitError|null} error An error object if there was an issue, null otherwise.
- * @param {Entry[]} entries The tree entries.
- */
- event.emit('end', error ? new git.error(error.message, error.code) : null, entries);
- });
-
- return event;
-};
-
-exports.tree = Tree;
-
-
-
-
-
-
-
-
-
-
-
-
- Classes Events Namespaces Global
-
-
-
-
-
-
-
-
&
-
-
-
-
-
-
-
-
-
-