-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cannot build new libgit2 #2
Comments
In libgit2's bundled xdiff, the typedef struct s_xdemitconf {
long ctxlen;
long interhunkctxlen;
unsigned long flags;
find_func_t find_func;
void *find_func_priv;
void (*emit_func)(void);
} xdemitconf_t; In @spotrh's unbundled libxdiff, the same structure is defined as follows: typedef struct s_xdemitconf {
long ctxlen;
long interhunkctxlen;
unsigned long flags;
find_func_t find_func;
void *find_func_priv;
xdl_emit_hunk_consume_func_t hunk_func;
} xdemitconf_t; So the error message is actually quite obvious, spot's unbundled libxdiff indeed does not have an |
Now the problem is, we are targetting mainly git and libgit2, we know libgit2 is using emit_func but what about git? is git using hunk_func? If yes we have a conflict here and either git or libgit2 should be fixed... |
Adding @arrbee too |
In its typedef struct s_xdemitconf {
long ctxlen;
long interhunkctxlen;
unsigned long flags;
find_func_t find_func;
void *find_func_priv;
xdl_emit_hunk_consume_func_t hunk_func;
} xdemitconf_t; So spot's libxdiff has the same thing as Git. |
I'm afraid I still don't see any evidence of activity on this project that motivates me to adopt it for libgit2 (as I have explained in libgit2/libgit2#1658 in more detail). I could be convinced to pull more recent code over from core Git because there is some evidence of active maintenance, but this project seems to be unmaintained (as I feared when this came up 6 months ago). |
@arrbee pulling the latest stuff from git also works for us, since in that way we can always keep this up to date from the git's copy. Thoughts? |
@nacho I've started looking at pulling in the latest code from git.git directly into libgit2. There are significant API changes to accessing diff data so it is not a small change, but it does seem worthwhile to me. I will continue to work on it this week and see how much is actually involved. By the way, I would still love it if this project became an effort to maintain and maybe even document an actual new libxdiff library. But I see that no xdiff related commits from git.git have ever been pulled into this repo since the initial creation, even though some of those are now more than 6 months old. Ah well. |
@arrbee what about making this a submodule of libgit2? the idea would be to be pushing all the latest git stuff here and use it in libgit2. This way:
See also that would mean making you part of the maintainers of this module |
@spotrh any comments on this? |
I have just merged bochecha's changes to sync with the latest code in git. I haven't had anywhere near as much time as I would have liked to push this, but I greatly appreciate the help. |
@spotrh what about making a new release with these changes so we can create a new package for libxdiff and patch libgit2 to use it? |
/builddir/build/BUILD/libgit2-0.20.0/src/blame_git.c: In function 'diff_hunks':
/builddir/build/BUILD/libgit2-0.20.0/src/blame_git.c:351:7: error: 'xdemitconf_t' has no member named 'emit_func'
Although libgit2's xdiff copy seems to not have been updated since 2012...
The text was updated successfully, but these errors were encountered: