summaryrefslogtreecommitdiff
path: root/credentials.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-02-23 13:53:17 +0000
committerlhchavez <[email protected]>2020-02-23 13:53:17 +0000
commitc20008416a64e2ae884a14332b258160a261a5df (patch)
tree58ae95d9f007937876eed1aac89b0518a034e442 /credentials.go
parent79fe156d307a9c7b294aa92c741dc0c2759a1894 (diff)
parent4bca045e5aa98b0b791fb467705de0692fe3514f (diff)
Merge remote-tracking branch 'upstream/master' into git_index_add_frombuffer
Diffstat (limited to 'credentials.go')
-rw-r--r--credentials.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/credentials.go b/credentials.go
index 4e42b6e..038313b 100644
--- a/credentials.go
+++ b/credentials.go
@@ -2,6 +2,9 @@ package git
/*
#include <git2.h>
+#include <git2/sys/cred.h>
+
+git_credtype_t _go_git_cred_credtype(git_cred *cred);
*/
import "C"
import "unsafe"
@@ -27,7 +30,7 @@ func (o *Cred) HasUsername() bool {
}
func (o *Cred) Type() CredType {
- return (CredType)(o.ptr.credtype)
+ return (CredType)(C._go_git_cred_credtype(o.ptr))
}
func credFromC(ptr *C.git_cred) *Cred {