build errors with save-git.c and upstream libgit2

Lubomir I. Ivanov neolit123 at gmail.com
Fri Mar 21 06:19:19 PDT 2014


last night i've tried building post the latest additions from linus in
save-git.c, but got some errors related to 'git_checkout_opts opts =
GIT_CHECKOUT_OPTS_INIT';

today today i've tried pulling the latest libgit2 and got the
following set of errors.
i don't find 'git_checkout_opts opts' or ' GIT_CHECKOUT_OPTS_INIT'
declared in the libgit2 tree or in our sources.

----------------------------------------------------------------
save-git.c: In function 'update_git_checkout':
save-git.c:802:2: error: unknown type name 'git_checkout_opts'
  git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
  ^
save-git.c:802:27: error: 'GIT_CHECKOUT_OPTS_INIT' undeclared (first use in thi
 function)
  git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
                           ^
save-git.c:802:27: note: each undeclared identifier is reported only once for e
ch function it appears in
save-git.c:804:6: error: request for member 'checkout_strategy' in something no
 a structure or union
  opts.checkout_strategy = GIT_CHECKOUT_SAFE;
      ^
save-git.c:805:6: error: request for member 'notify_flags' in something not a s
ructure or union
  opts.notify_flags = GIT_CHECKOUT_NOTIFY_CONFLICT | GIT_CHECKOUT_NOTIFY_DIRTY;
      ^
save-git.c:806:6: error: request for member 'notify_cb' in something not a stru
ture or union
  opts.notify_cb = notify_cb;
      ^
save-git.c:807:6: error: request for member 'baseline' in something not a struc
ure or union
  opts.baseline = get_git_tree(repo, parent);
      ^
save-git.c:808:2: warning: passing argument 3 of 'git_checkout_tree' from incom
atible pointer type [enabled by default]
  return git_checkout_tree(repo, (git_object *) tree, &opts);
  ^
In file included from ../linux_lib/libgit2/include/git2.h:16:0,
                 from save-git.c:11:
../linux_lib/libgit2/include/git2/checkout.h:321:17: note: expected 'const stru
t git_checkout_options *' but argument is of type 'int *'
 GIT_EXTERN(int) git_checkout_tree(
                 ^
make[1]: *** [.obj/save-git.o] Error 1
----------------------------------------------------------------

lubomir
--


More information about the subsurface mailing list