Skip to content
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

Open
nacho opened this issue Nov 28, 2013 · 12 comments
Open

Cannot build new libgit2 #2

nacho opened this issue Nov 28, 2013 · 12 comments

Comments

@nacho
Copy link

nacho commented Nov 28, 2013

/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...

@bochecha
Copy link
Contributor

In libgit2's bundled xdiff, the xdemitconf_t 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;
        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 emit_func member.

@nacho
Copy link
Author

nacho commented Nov 29, 2013

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...

@nacho
Copy link
Author

nacho commented Nov 29, 2013

Adding @arrbee too

@bochecha
Copy link
Contributor

In its xdiff/xdiff.h, Git 1.8.4.2 has:

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.

@arrbee
Copy link

arrbee commented Nov 29, 2013

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).

@nacho
Copy link
Author

nacho commented Nov 29, 2013

@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?

@arrbee
Copy link

arrbee commented Dec 2, 2013

@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.

@nacho
Copy link
Author

nacho commented Dec 3, 2013

@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:

  1. libgit2 would decide which commit to use
  2. distributions would have a single place where to fetch the module

See also that would mean making you part of the maintainers of this module

@bochecha
Copy link
Contributor

bochecha commented Dec 9, 2013

Seconding @nacho's submodule suggestion.

Also, I've just opened #3 which updates to the latest xdiff code in Git, as @arrbee correctly found that this repository was out of date.

@nacho
Copy link
Author

nacho commented Dec 9, 2013

@spotrh any comments on this?

@spotrh
Copy link
Owner

spotrh commented Dec 9, 2013

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.

@nacho
Copy link
Author

nacho commented Dec 9, 2013

@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?

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

No branches or pull requests

4 participants