-
Notifications
You must be signed in to change notification settings - Fork 696
Expand file tree
/
Copy pathindex.js
More file actions
35 lines (27 loc) · 938 Bytes
/
index.js
File metadata and controls
35 lines (27 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var NodeGit = require("../");
var Index = NodeGit.Index;
/**
* Return an array of the entries in this index.
* @return {Array<IndexEntry>} an array of IndexEntrys
*/
Index.prototype.entries = function() {
var size = this.entryCount();
var result = [];
for (var i = 0; i < size; i++) {
result.push(this.getByIndex(i));
}
return result;
};
var addAll = Index.prototype.addAll;
Index.prototype.addAll = function(pathspec, flags, matchedCallback) {
return addAll.call(this, pathspec || "*", flags, matchedCallback, null);
};
var removeAll = Index.prototype.removeAll;
Index.prototype.removeAll = function(pathspec, matchedCallback) {
return removeAll.call(this, pathspec || "*", matchedCallback, null);
};
var updateAll = Index.prototype.updateAll;
Index.prototype.updateAll = function(pathspec, matchedCallback) {
return updateAll.call(this, pathspec || "*", matchedCallback, null);
};
module.exports = Index;