Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions 37 generate/input/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@
},
"types":
{
"annotated": {
"functions": {
"git_annotated_commit_free": {
"ignore": true
}
}
},
"attr": {
"functions": {
"git_attr_foreach": {
Expand All @@ -83,6 +90,14 @@
"isReturn": true
}
}
},
"git_attr_get_many": {
"args": {
"values_out": {
"isReturn": true,
"jsClassName": "Array"
}
}
}
}
},
Expand Down Expand Up @@ -126,6 +141,9 @@
},
"branch": {
"functions": {
"git_branch_iterator_free": {
"ignore": true
},
"git_branch_create": {
"args": {
"force": {
Expand Down Expand Up @@ -853,6 +871,9 @@
},
"note": {
"functions": {
"git_note_iterator_free": {
"ignore": true
},
"git_note_create": {
"args": {
"out": {
Expand Down Expand Up @@ -1096,6 +1117,9 @@
},
"pathspec": {
"functions": {
"git_pathspec_match_list_free": {
"ignore": true
},
"git_pathspec_new": {
"ignore": true
}
Expand Down Expand Up @@ -1344,6 +1368,9 @@
},
"repository": {
"functions": {
"git_repository_init_init_options": {
"ignore": true
},
"git_repository_discover": {
"ignore": true
},
Expand All @@ -1364,6 +1391,13 @@
}
}
},
"revert": {
"functions": {
"git_revert_init_options": {
"ignore": true
}
}
},
"revparse": {
"functions": {
"git_revparse": {
Expand Down Expand Up @@ -1542,6 +1576,9 @@
},
"tree": {
"functions": {
"git_tree_entry_free": {
"ignore": true
},
"git_tree_entry_byindex": {
"jsFunctionName": "_entryByIndex"
},
Expand Down
8 changes: 4 additions & 4 deletions 8 lib/blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ var Blob = NodeGit.Blob;

/**
* Retrieves the blob pointed to by the oid
* @async
* @param {Repository} repo The repo that the blob lives in
* @param {String|Oid|Blob} id The blob to lookup
* @param {Function} callback
* @return {Blob}
*/
Blob.lookup = LookupWrapper(Blob);

/**
* Retrieve the content of the Blob.
*
* @return {Buffer} Contents.
* @return {Buffer} Contents as a buffer.
*/
Blob.prototype.content = function() {
return this.rawcontent().toBuffer(this.rawsize());
Expand All @@ -25,7 +25,7 @@ Blob.prototype.content = function() {
/**
* Retrieve the Blob's content as String.
*
* @return {string} Contents.
* @return {String} Contents as a string.
*/
Blob.prototype.toString = function() {
return this.content().toString();
Expand All @@ -34,7 +34,7 @@ Blob.prototype.toString = function() {
/**
* Retrieve the Blob's type.
*
* @return {number} The filemode.
* @return {Number} The filemode of the blob.
*/
Blob.prototype.filemode = function() {
var FileMode = TreeEntry.FILEMODE;
Expand Down
14 changes: 9 additions & 5 deletions 14 lib/checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ var tree = Checkout.tree;
/**
* Patch head checkout to automatically coerce objects.
*
* @param url
* @param options
* @async
* @param {Repository} repo The repo to checkout head
* @param {CheckoutOptions} [options] Options for the checkout
* @return {Void} checkout complete
*/
Checkout.head = function(url, options) {
options = normalizeOptions(options, NodeGit.CheckoutOptions);
Expand All @@ -20,9 +22,11 @@ Checkout.head = function(url, options) {
/**
* Patch tree checkout to automatically coerce objects.
*
* @param repo
* @param treeish
* @param options
* @async
* @param {Repository} repo
* @param {Oid|Tree|Commit|Reference} treeish
* @param {CheckoutOptions} [options]
* @return {Void} checkout complete
*/
Checkout.tree = function(repo, treeish, options) {
options = normalizeOptions(options, NodeGit.CheckoutOptions);
Expand Down
8 changes: 5 additions & 3 deletions 8 lib/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ var clone = Clone.clone;
/**
* Patch repository cloning to automatically coerce objects.
*
* @param url
* @param local_path
* @param options
* @async
* @param {String} url url of the repository
* @param {String} local_path local path to store repository
* @param {CloneOptions} [options]
* @return {Repository} repo
*/
Clone.clone = function(url, local_path, options) {
var remoteCallbacks;
Expand Down
29 changes: 18 additions & 11 deletions 29 lib/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ var Commit = NodeGit.Commit;

/**
* Retrieves the commit pointed to by the oid
* @async
* @param {Repository} repo The repo that the commit lives in
* @param {String|Oid|Commit} id The commit to lookup
* @param {Function} callback
* @return {Commit}
*/
Commit.lookup = LookupWrapper(Commit);
Expand Down Expand Up @@ -41,7 +41,7 @@ Commit.prototype.date = function() {
/**
* Get the tree associated with this commit.
*
* @param {Function} callback
* @async
* @return {Tree}
*/
Commit.prototype.getTree = function(callback) {
Expand All @@ -52,8 +52,8 @@ Commit.prototype.getTree = function(callback) {
* Retrieve the entry represented by path for this commit.
* Path must be relative to repository root.
*
* @async
* @param {String} path
* @param {Function} callback
* @return {TreeEntry}
*/
Commit.prototype.getEntry = function(path, callback) {
Expand All @@ -68,16 +68,20 @@ Commit.prototype.getEntry = function(path, callback) {
}, callback);
};


/**
* 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.
* Don"t forget to call `start()` on the returned event.
* Don't forget to call `start()` on the returned event.
*
* @fires Commit#commit
* @fires Commit#end
* @fires EventEmitter#commit Commit
* @fires EventEmitter#end Array<Commit>
* @fires EventEmitter#error Error
*
* @return {EventEmitter}
* @start start()
*/
Commit.prototype.history = function() {
var event = new events.EventEmitter();
Expand Down Expand Up @@ -107,12 +111,14 @@ Commit.prototype.history = function() {
return event;
};


/**
* Retrieve the commit"s parents -- as commit objects.
* Retrieve the commit's parents as commit objects.
*
* @param {number} limit - Optional amount of parents to return.
* @async
* @param {number} limit Optional amount of parents to return.
* @param {Function} callback
* @return {[Commit]} array of commits
* @return {Array<Commit>} array of commits
*/
Commit.prototype.getParents = function(limit, callback) {
var parents = [];
Expand Down Expand Up @@ -147,7 +153,7 @@ Commit.prototype.getParents = function(limit, callback) {
* Retrieve the commit"s parent shas.
*
* @param {Function} callback
* @return {[Oid]} array of oids
* @return {Array<Oids>} array of oids
*/
Commit.prototype.parents = function() {
var result = [];
Expand All @@ -163,8 +169,9 @@ Commit.prototype.parents = function() {
* Generate an array of diff trees showing changes between this commit
* and its parent(s).
*
* @async
* @param {Function} callback
* @return {[Diff]} an array of diffs
* @return {Array<Diff>} an array of diffs
*/
Commit.prototype.getDiff = function(callback) {
var commit = this;
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var Index = NodeGit.Index;

/**
* Return an array of the entries in this index.
* @return {[IndexEntry]} an array of IndexEntrys
* @return {Array<IndexEntry>} an array of IndexEntrys
*/
Index.prototype.entries = function() {
var size = this.entryCount();
Expand Down
8 changes: 4 additions & 4 deletions 8 lib/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ var mergeCommits = Merge.commits;
* Merge 2 commits together and create an new index that can
* be used to create a merge commit.
*
* @param repo Repository that contains the given commits
* @param ourCommit The commit that reflects the destination tree
* @oaram theirCommit The commit to merge into ourCommit
* @param options The merge tree options (null for default)
* @param {Repository} repo Repository that contains the given commits
* @param {Commit} ourCommit The commit that reflects the destination tree
* @param {Commit} theirCommit The commit to merge into ourCommit
* @param {MergeOptions} [options] The merge tree options (null for default)
*/
Merge.commits = function(repo, ourCommit, theirCommit, options) {
options = normalizeOptions(options, NodeGit.MergeOptions);
Expand Down
2 changes: 2 additions & 0 deletions 2 lib/reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var Branch = NodeGit.Branch;

/**
* Retrieves the reference pointed to by the oid
* @async
* @param {Repository} repo The repo that the reference lives in
* @param {String|Reference} id The reference to lookup
* @param {Function} callback
Expand All @@ -15,6 +16,7 @@ Reference.lookup = LookupWrapper(Reference);

/**
* Retrieves the reference by it's short name
* @async
* @param {Repository} repo The repo that the reference lives in
* @param {String|Reference} id The reference to lookup
* @param {Function} callback
Expand Down
1 change: 1 addition & 0 deletions 1 lib/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var setCallbacks = Remote.prototype.setCallbacks;

/**
* Retrieves the remote by name
* @async
* @param {Repository} repo The repo that the remote lives in
* @param {String|Remote} name The remote to lookup
* @param {Function} callback
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.