-
Notifications
You must be signed in to change notification settings - Fork 698
Adding git_filter support in nodegit #1331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
AsyncBatonWithNoResults wip 2
Build + test register complete filter init test wip
Adding subtract filter + refactoring template code to eliminate new self() in cc code filter registry update + templating changes
working filters!! (for now)
Reached Async Land adding error handling testing commit + apply callback fixed field_accessor template on windows
implementing checks in test suite added more filter tests lol CRLF Added more unit tests
e37c852 to
8c6d2a5
Compare
generate/scripts/generateJson.js
Outdated
| }, {}).valueOf(); | ||
|
|
||
| // decorate the definitions with required data to build the C++ files | ||
| //TODO: add self ref tag here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment needed anymore?
| } | ||
|
|
||
| if (cArg === args.length -1) { | ||
| arg.lastArg = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire block is:
arg.lastArg = cArg === args.length - 1;
arg.firstArg = !arg.lastArg && cArg === 0;| @@ -0,0 +1,3 @@ | |||
| module.exports = function(value, other) { | |||
| return (value - other); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need parentheses.
|
|
||
| struct AsyncBatonWithNoResult : public AsyncBaton { | ||
| /* ResultT result; | ||
| ResultT defaultResult;*/ // result returned if the callback doesn't return anything valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment does not apply to this structure.
| @@ -0,0 +1,85 @@ | |||
| // This is a generated file, modify: generate/templates/templates/class_header.h | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a generated file.
test/tests/filter.js
Outdated
| check: function(src, attr) { | ||
| return src.path() === "README.md" ? 0 : GIT_PASSTHROUGH; | ||
| }, | ||
| cleanup: function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup: function() {}
test/tests/filter.js
Outdated
| }, 0) | ||
| .then(function(result) { | ||
| global.gc(); | ||
| assert.strictEqual(result, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NodeGit.Error.CODE.OK
test/tests/filter.js
Outdated
| .then(function() { | ||
| return commitFile(test.repository, "README.md", | ||
| "testing commit contents", | ||
| "test commit"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
); on new line please
test/tests/filter.js
Outdated
| }) | ||
| .then(function(commit) { | ||
| var postInitializeReadmeContents = fse.readFileSync( | ||
| readmePath, "utf-8"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
); on new line please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added these fixes in
test/tests/filter.js
Outdated
| } | ||
| }, 0) | ||
| .then(function(result) { | ||
| assert.strictEqual(result, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NodeGit.Error.CODE.OK
f0e45be to
4c73221
Compare
4c73221 to
debcf21
Compare
Adding support for git_filter to nodegit.
Changes:
Filters are now asynchronous,
FilterRegistry added to register and unregister filters.