Skip to content

adding GIT_FILTER_VERSION to GIT_FILTER_INIT as part of convention#4267

Merged
ethomson merged 2 commits into
libgit2:masterfrom
mohseenrm:master
Jun 14, 2017
Merged

adding GIT_FILTER_VERSION to GIT_FILTER_INIT as part of convention#4267
ethomson merged 2 commits into
libgit2:masterfrom
mohseenrm:master

Conversation

@mohseenrm

Copy link
Copy Markdown
Contributor

Adding GIT_FILTER_VERSION to GIT_FILTER_INIT.
Stumbled on this while using custom filters via. filter struct.
Also on the recommendation of @implausible.

Similar convention seen in files:
include/git2/sys/blame.h (Line 82)
include/git2/sys/checkout.h (Line 298)
include/git2/sys/cherrypick.h (Line 37)
...

@ethomson

Copy link
Copy Markdown
Member

Yep, this probably makes sense and this changes looks good. 👍

One thing we also do is provide a function that will memcpy the initialization data into a given struct - this is nice especially for languages that FFI w/o the C preprocessor.

Would you be so kind as to also add a git_filter_init that does this?

See git_odb_init_backend for an example, and its corresponding implementation. And note the unit tests to verify them.

Thanks!

@mohseenrm

Copy link
Copy Markdown
Contributor Author

No problem @ethomson !

Just check if all the changes are consistent with what you had in mind 😊

@ethomson

Copy link
Copy Markdown
Member

Awesome, thanks @mohseenrm !

@ethomson ethomson merged commit 8296da5 into libgit2:master Jun 14, 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