summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2019-12-10 22:33:00 +0000
committerCarlos Martín Nieto <[email protected]>2019-12-10 22:33:00 +0000
commitc5159e624e55cb14c56a3e5f36200be409fba9d6 (patch)
treed7b16f854db35a2ae348bc1eaa11ba860f37c966 /wrapper.c
parentce19fa064f3cb3ef6c4b360076ffc17556b2cc3c (diff)
credentials: unconfuse Go about the type
For some reason cgo thinks the `credtype` field does not exist in `git_cred` so let's put it into the C code.
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wrapper.c b/wrapper.c
index 11c2f32..3656773 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -2,6 +2,7 @@
#include <git2.h>
#include <git2/sys/odb_backend.h>
#include <git2/sys/refdb_backend.h>
+#include <git2/sys/cred.h>
typedef int (*gogit_submodule_cbk)(git_submodule *sm, const char *name, void *payload);
@@ -180,4 +181,8 @@ void _go_git_writestream_free(git_writestream *stream)
stream->free(stream);
}
+git_credtype_t _go_git_cred_credtype(git_cred *cred) {
+ return cred->credtype;
+}
+
/* EOF */