1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
package git
/*
#include <git2.h>
*/
import "C"
import (
"unsafe"
)
// The constants, functions, and types in this files are slated for deprecation
// in the next major version.
// blob.go
// BlobChunkCallback is not used.
type BlobChunkCallback func(maxLen int) ([]byte, error)
// BlobCallbackData is not used.
type BlobCallbackData struct {
Callback BlobChunkCallback
Error error
}
// checkout.go
// CheckoutOpts is a deprecated alias of CheckoutOptions.
type CheckoutOpts = CheckoutOptions
// credentials.go
// CredType is a deprecated alias of CredentialType
type CredType = CredentialType
const (
CredTypeUserpassPlaintext = CredentialTypeUserpassPlaintext
CredTypeSshKey = CredentialTypeSSHKey
CredTypeSshCustom = CredentialTypeSSHCustom
CredTypeDefault = CredentialTypeDefault
)
// Cred is a deprecated alias of Credential
type Cred = Credential
// NewCredUsername is a deprecated alias of NewCredentialUsername.
func NewCredUsername(username string) (*Cred, error) {
return NewCredentialUsername(username)
}
// NewCredUserpassPlaintext is a deprecated alias of NewCredentialUserpassPlaintext.
func NewCredUserpassPlaintext(username string, password string) (*Cred, error) {
return NewCredentialUserpassPlaintext(username, password)
}
// NewCredSshKey is a deprecated alias of NewCredentialSshKey.
func NewCredSshKey(username string, publicKeyPath string, privateKeyPath string, passphrase string) (*Cred, error) {
return NewCredentialSSHKey(username, publicKeyPath, privateKeyPath, passphrase)
}
// NewCredSshKeyFromMemory is a deprecated alias of NewCredentialSSHKeyFromMemory.
func NewCredSshKeyFromMemory(username string, publicKey string, privateKey string, passphrase string) (*Cred, error) {
return NewCredentialSSHKeyFromMemory(username, publicKey, privateKey, passphrase)
}
// NewCredSshKeyFromAgent is a deprecated alias of NewCredentialSSHFromAgent.
func NewCredSshKeyFromAgent(username string) (*Cred, error) {
return NewCredentialSSHKeyFromAgent(username)
}
// NewCredDefault is a deprecated alias fof NewCredentialDefault.
func NewCredDefault() (*Cred, error) {
return NewCredentialDefault()
}
// features.go
const (
// FeatureHttps is a deprecated alias of FeatureHTTPS.
FeatureHttps = FeatureHTTPS
// FeatureSsh is a deprecated alias of FeatureSSH.
FeatureSsh = FeatureSSH
)
// git.go
const (
ErrClassNone = ErrorClassNone
ErrClassNoMemory = ErrorClassNoMemory
ErrClassOs = ErrorClassOS
ErrClassInvalid = ErrorClassInvalid
ErrClassReference = ErrorClassReference
ErrClassZlib = ErrorClassZlib
ErrClassRepository = ErrorClassRepository
ErrClassConfig = ErrorClassConfig
ErrClassRegex = ErrorClassRegex
ErrClassOdb = ErrorClassOdb
ErrClassIndex = ErrorClassIndex
ErrClassObject = ErrorClassObject
ErrClassNet = ErrorClassNet
ErrClassTag = ErrorClassTag
ErrClassTree = ErrorClassTree
ErrClassIndexer = ErrorClassIndexer
ErrClassSSL = ErrorClassSSL
ErrClassSubmodule = ErrorClassSubmodule
ErrClassThread = ErrorClassThread
ErrClassStash = ErrorClassStash
ErrClassCheckout = ErrorClassCheckout
ErrClassFetchHead = ErrorClassFetchHead
ErrClassMerge = ErrorClassMerge
ErrClassSsh = ErrorClassSSH
ErrClassFilter = ErrorClassFilter
ErrClassRevert = ErrorClassRevert
ErrClassCallback = ErrorClassCallback
ErrClassRebase = ErrorClassRebase
ErrClassPatch = ErrorClassPatch
)
const (
ErrOk = ErrorCodeOK
ErrGeneric = ErrorCodeGeneric
ErrNotFound = ErrorCodeNotFound
ErrExists = ErrorCodeExists
ErrAmbiguous = ErrorCodeAmbiguous
ErrAmbigious = ErrorCodeAmbiguous
ErrBuffs = ErrorCodeBuffs
ErrUser = ErrorCodeUser
ErrBareRepo = ErrorCodeBareRepo
ErrUnbornBranch = ErrorCodeUnbornBranch
ErrUnmerged = ErrorCodeUnmerged
ErrNonFastForward = ErrorCodeNonFastForward
ErrInvalidSpec = ErrorCodeInvalidSpec
ErrConflict = ErrorCodeConflict
ErrLocked = ErrorCodeLocked
ErrModified = ErrorCodeModified
ErrAuth = ErrorCodeAuth
ErrCertificate = ErrorCodeCertificate
ErrApplied = ErrorCodeApplied
ErrPeel = ErrorCodePeel
ErrEOF = ErrorCodeEOF
ErrUncommitted = ErrorCodeUncommitted
ErrDirectory = ErrorCodeDirectory
ErrMergeConflict = ErrorCodeMergeConflict
ErrPassthrough = ErrorCodePassthrough
ErrIterOver = ErrorCodeIterOver
ErrApplyFail = ErrorCodeApplyFail
)
// index.go
// IndexAddOpts is a deprecated alias of IndexAddOption.
type IndexAddOpts = IndexAddOption
// IndexStageOpts is a deprecated alias of IndexStageState.
type IndexStageOpts = IndexStageState
// submodule.go
// SubmoduleCbk is a deprecated alias of SubmoduleCallback.
type SubmoduleCbk = SubmoduleCallback
// SubmoduleVisitor is not used.
func SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer) C.int {
sub := &Submodule{(*C.git_submodule)(csub), nil}
callback, ok := pointerHandles.Get(handle).(SubmoduleCallback)
if !ok {
panic("invalid submodule visitor callback")
}
return (C.int)(callback(sub, C.GoString(name)))
}
// tree.go
// CallbackGitTreeWalk is not used.
func CallbackGitTreeWalk(_root *C.char, entry *C.git_tree_entry, ptr unsafe.Pointer) C.int {
root := C.GoString(_root)
if callback, ok := pointerHandles.Get(ptr).(TreeWalkCallback); ok {
return C.int(callback(root, newTreeEntry(entry)))
} else {
panic("invalid treewalk callback")
}
}
|