Skip to content

Conversation

@mohseenrm
Copy link
Contributor

@mohseenrm mohseenrm commented Jul 25, 2017

Adding support for git_filter to nodegit.

Changes:
Filters are now asynchronous,
FilterRegistry added to register and unregister filters.

mohseenrm and others added 8 commits July 25, 2017 12:18
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
@mohseenrm mohseenrm force-pushed the feature/git-filter branch from e37c852 to 8c6d2a5 Compare July 25, 2017 19:47
}, {}).valueOf();

// decorate the definitions with required data to build the C++ files
//TODO: add self ref tag here
Copy link
Member

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;
Copy link
Member

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);
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.

check: function(src, attr) {
return src.path() === "README.md" ? 0 : GIT_PASSTHROUGH;
},
cleanup: function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup: function() {}

}, 0)
.then(function(result) {
global.gc();
assert.strictEqual(result, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NodeGit.Error.CODE.OK

.then(function() {
return commitFile(test.repository, "README.md",
"testing commit contents",
"test commit");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

); on new line please

})
.then(function(commit) {
var postInitializeReadmeContents = fse.readFileSync(
readmePath, "utf-8");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

); on new line please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added these fixes in

}
}, 0)
.then(function(result) {
assert.strictEqual(result, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NodeGit.Error.CODE.OK

@mohseenrm mohseenrm force-pushed the feature/git-filter branch from f0e45be to 4c73221 Compare July 26, 2017 23:00
@mohseenrm mohseenrm force-pushed the feature/git-filter branch from 4c73221 to debcf21 Compare July 31, 2017 20:29
@implausible implausible merged commit 92a570f into nodegit:master Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants