libgit2/rugged — Issue #34: too few arguments to function ‘git_commit_create’
Author: suguiura
Created: 2011-11-11 23:10:00+00:00
State: open

I'm using the 0.15.0 version of libgit2 and the HEAD version of rugged. Among many warnings, I get the error at the title:

$ rake compile
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /home/rafael/.gem/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
cd tmp/i686-linux/rugged/1.9.3
gmake
compiling ../../../../ext/rugged/rugged_commit.c
../../../../ext/rugged/rugged_commit.c: In function ‘rb_git_commit_message_short_GET’:
../../../../ext/rugged/rugged_commit.c:49:2: warning: passing argument 1 of ‘rugged_str_new2’ makes pointer from integer without a cast
../../../../ext/rugged/rugged.h:201:21: note: expected ‘const char *’ but argument is of type ‘int’
../../../../ext/rugged/rugged_commit.c: In function ‘rb_git_commit_create’:
../../../../ext/rugged/rugged_commit.c:187:3: warning: passing argument 7 of ‘git_commit_create’ from incompatible pointer type
/usr/include/git2/commit.h:224:17: note: expected ‘const char *’ but argument is of type ‘struct git_tree *’
../../../../ext/rugged/rugged_commit.c:187:3: warning: passing argument 8 of ‘git_commit_create’ makes pointer from integer without a cast
/usr/include/git2/commit.h:224:17: note: expected ‘const struct git_tree *’ but argument is of type ‘int’
../../../../ext/rugged/rugged_commit.c:187:3: warning: passing argument 9 of ‘git_commit_create’ makes integer from pointer without a cast
/usr/include/git2/commit.h:224:17: note: expected ‘int’ but argument is of type ‘const struct git_commit **’
../../../../ext/rugged/rugged_commit.c:187:3: error: too few arguments to function ‘git_commit_create’
/usr/include/git2/commit.h:224:17: note: declared here
gmake: *** [rugged_commit.o] Error 1
rake aborted!
Command failed with status (2): [gmake...]

Tasks: TOP => compile => compile:i686-linux => compile:rugged:i686-linux => copy:rugged:i686-linux:1.9.3 => tmp/i686-linux/rugged/1.9.3/rugged.so
(See full trace by running task with --trace)

I checked that line and it's lacking either a message_encoding or a message variable. (I have no idea which one.)