- Notifications
You must be signed in to change notification settings - Fork 324
/
Copy pathdeprecated.go
271 lines (232 loc) · 10 KB
/
deprecated.go
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
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
// Deprecated: BlobChunkCallback is not used.
typeBlobChunkCallbackfunc(maxLenint) ([]byte, error)
// Deprecated: BlobCallbackData is not used.
typeBlobCallbackDatastruct {
CallbackBlobChunkCallback
Errorerror
}
// checkout.go
// Deprecated: CheckoutOpts is a deprecated alias of CheckoutOptions.
typeCheckoutOpts=CheckoutOptions
// credentials.go
// Deprecated: CredType is a deprecated alias of CredentialType
typeCredType=CredentialType
const (
CredTypeUserpassPlaintext=CredentialTypeUserpassPlaintext
CredTypeSshKey=CredentialTypeSSHKey
CredTypeSshCustom=CredentialTypeSSHCustom
CredTypeDefault=CredentialTypeDefault
)
// Deprecated: Cred is a deprecated alias of Credential
typeCred=Credential
// Deprecated: NewCredUsername is a deprecated alias of NewCredentialUsername.
funcNewCredUsername(usernamestring) (*Cred, error) {
returnNewCredentialUsername(username)
}
// Deprecated: NewCredUserpassPlaintext is a deprecated alias of NewCredentialUserpassPlaintext.
funcNewCredUserpassPlaintext(usernamestring, passwordstring) (*Cred, error) {
returnNewCredentialUserpassPlaintext(username, password)
}
// Deprecated: NewCredSshKey is a deprecated alias of NewCredentialSshKey.
funcNewCredSshKey(usernamestring, publicKeyPathstring, privateKeyPathstring, passphrasestring) (*Cred, error) {
returnNewCredentialSSHKey(username, publicKeyPath, privateKeyPath, passphrase)
}
// Deprecated: NewCredSshKeyFromMemory is a deprecated alias of NewCredentialSSHKeyFromMemory.
funcNewCredSshKeyFromMemory(usernamestring, publicKeystring, privateKeystring, passphrasestring) (*Cred, error) {
returnNewCredentialSSHKeyFromMemory(username, publicKey, privateKey, passphrase)
}
// Deprecated: NewCredSshKeyFromAgent is a deprecated alias of NewCredentialSSHFromAgent.
funcNewCredSshKeyFromAgent(usernamestring) (*Cred, error) {
returnNewCredentialSSHKeyFromAgent(username)
}
// Deprecated: NewCredDefault is a deprecated alias fof NewCredentialDefault.
funcNewCredDefault() (*Cred, error) {
returnNewCredentialDefault()
}
// diff.go
const (
// Deprecated: DiffIgnoreWhitespaceEol is a deprecated alias of DiffIgnoreWhitespaceEOL.
DiffIgnoreWitespaceEol=DiffIgnoreWhitespaceEOL
)
// features.go
const (
// Deprecated: FeatureHttps is a deprecated alias of FeatureHTTPS.
FeatureHttps=FeatureHTTPS
// Deprecated: FeatureSsh is a deprecated alias of FeatureSSH.
FeatureSsh=FeatureSSH
)
// git.go
const (
// Deprecated: ErrClassNone is a deprecated alias of ErrorClassNone.
ErrClassNone=ErrorClassNone
// Deprecated: ErrClassNoMemory is a deprecated alias of ErrorClassNoMemory.
ErrClassNoMemory=ErrorClassNoMemory
// Deprecated: ErrClassOs is a deprecated alias of ErrorClassOS.
ErrClassOs=ErrorClassOS
// Deprecated: ErrClassInvalid is a deprecated alias of ErrorClassInvalid.
ErrClassInvalid=ErrorClassInvalid
// Deprecated: ErrClassReference is a deprecated alias of ErrorClassReference.
ErrClassReference=ErrorClassReference
// Deprecated: ErrClassZlib is a deprecated alias of ErrorClassZlib.
ErrClassZlib=ErrorClassZlib
// Deprecated: ErrClassRepository is a deprecated alias of ErrorClassRepository.
ErrClassRepository=ErrorClassRepository
// Deprecated: ErrClassConfig is a deprecated alias of ErrorClassConfig.
ErrClassConfig=ErrorClassConfig
// Deprecated: ErrClassRegex is a deprecated alias of ErrorClassRegex.
ErrClassRegex=ErrorClassRegex
// Deprecated: ErrClassOdb is a deprecated alias of ErrorClassOdb.
ErrClassOdb=ErrorClassOdb
// Deprecated: ErrClassIndex is a deprecated alias of ErrorClassIndex.
ErrClassIndex=ErrorClassIndex
// Deprecated: ErrClassObject is a deprecated alias of ErrorClassObject.
ErrClassObject=ErrorClassObject
// Deprecated: ErrClassNet is a deprecated alias of ErrorClassNet.
ErrClassNet=ErrorClassNet
// Deprecated: ErrClassTag is a deprecated alias of ErrorClassTag.
ErrClassTag=ErrorClassTag
// Deprecated: ErrClassTree is a deprecated alias of ErrorClassTree.
ErrClassTree=ErrorClassTree
// Deprecated: ErrClassIndexer is a deprecated alias of ErrorClassIndexer.
ErrClassIndexer=ErrorClassIndexer
// Deprecated: ErrClassSSL is a deprecated alias of ErrorClassSSL.
ErrClassSSL=ErrorClassSSL
// Deprecated: ErrClassSubmodule is a deprecated alias of ErrorClassSubmodule.
ErrClassSubmodule=ErrorClassSubmodule
// Deprecated: ErrClassThread is a deprecated alias of ErrorClassThread.
ErrClassThread=ErrorClassThread
// Deprecated: ErrClassStash is a deprecated alias of ErrorClassStash.
ErrClassStash=ErrorClassStash
// Deprecated: ErrClassCheckout is a deprecated alias of ErrorClassCheckout.
ErrClassCheckout=ErrorClassCheckout
// Deprecated: ErrClassFetchHead is a deprecated alias of ErrorClassFetchHead.
ErrClassFetchHead=ErrorClassFetchHead
// Deprecated: ErrClassMerge is a deprecated alias of ErrorClassMerge.
ErrClassMerge=ErrorClassMerge
// Deprecated: ErrClassSsh is a deprecated alias of ErrorClassSSH.
ErrClassSsh=ErrorClassSSH
// Deprecated: ErrClassFilter is a deprecated alias of ErrorClassFilter.
ErrClassFilter=ErrorClassFilter
// Deprecated: ErrClassRevert is a deprecated alias of ErrorClassRevert.
ErrClassRevert=ErrorClassRevert
// Deprecated: ErrClassCallback is a deprecated alias of ErrorClassCallback.
ErrClassCallback=ErrorClassCallback
// Deprecated: ErrClassRebase is a deprecated alias of ErrorClassRebase.
ErrClassRebase=ErrorClassRebase
// Deprecated: ErrClassPatch is a deprecated alias of ErrorClassPatch.
ErrClassPatch=ErrorClassPatch
)
const (
// Deprecated: ErrOk is a deprecated alias of ErrorCodeOK.
ErrOk=ErrorCodeOK
// Deprecated: ErrGeneric is a deprecated alias of ErrorCodeGeneric.
ErrGeneric=ErrorCodeGeneric
// Deprecated: ErrNotFound is a deprecated alias of ErrorCodeNotFound.
ErrNotFound=ErrorCodeNotFound
// Deprecated: ErrExists is a deprecated alias of ErrorCodeExists.
ErrExists=ErrorCodeExists
// Deprecated: ErrAmbiguous is a deprecated alias of ErrorCodeAmbiguous.
ErrAmbiguous=ErrorCodeAmbiguous
// Deprecated: ErrAmbigious is a deprecated alias of ErrorCodeAmbiguous.
ErrAmbigious=ErrorCodeAmbiguous
// Deprecated: ErrBuffs is a deprecated alias of ErrorCodeBuffs.
ErrBuffs=ErrorCodeBuffs
// Deprecated: ErrUser is a deprecated alias of ErrorCodeUser.
ErrUser=ErrorCodeUser
// Deprecated: ErrBareRepo is a deprecated alias of ErrorCodeBareRepo.
ErrBareRepo=ErrorCodeBareRepo
// Deprecated: ErrUnbornBranch is a deprecated alias of ErrorCodeUnbornBranch.
ErrUnbornBranch=ErrorCodeUnbornBranch
// Deprecated: ErrUnmerged is a deprecated alias of ErrorCodeUnmerged.
ErrUnmerged=ErrorCodeUnmerged
// Deprecated: ErrNonFastForward is a deprecated alias of ErrorCodeNonFastForward.
ErrNonFastForward=ErrorCodeNonFastForward
// Deprecated: ErrInvalidSpec is a deprecated alias of ErrorCodeInvalidSpec.
ErrInvalidSpec=ErrorCodeInvalidSpec
// Deprecated: ErrConflict is a deprecated alias of ErrorCodeConflict.
ErrConflict=ErrorCodeConflict
// Deprecated: ErrLocked is a deprecated alias of ErrorCodeLocked.
ErrLocked=ErrorCodeLocked
// Deprecated: ErrModified is a deprecated alias of ErrorCodeModified.
ErrModified=ErrorCodeModified
// Deprecated: ErrAuth is a deprecated alias of ErrorCodeAuth.
ErrAuth=ErrorCodeAuth
// Deprecated: ErrCertificate is a deprecated alias of ErrorCodeCertificate.
ErrCertificate=ErrorCodeCertificate
// Deprecated: ErrApplied is a deprecated alias of ErrorCodeApplied.
ErrApplied=ErrorCodeApplied
// Deprecated: ErrPeel is a deprecated alias of ErrorCodePeel.
ErrPeel=ErrorCodePeel
// Deprecated: ErrEOF is a deprecated alias of ErrorCodeEOF.
ErrEOF=ErrorCodeEOF
// Deprecated: ErrUncommitted is a deprecated alias of ErrorCodeUncommitted.
ErrUncommitted=ErrorCodeUncommitted
// Deprecated: ErrDirectory is a deprecated alias of ErrorCodeDirectory.
ErrDirectory=ErrorCodeDirectory
// Deprecated: ErrMergeConflict is a deprecated alias of ErrorCodeMergeConflict.
ErrMergeConflict=ErrorCodeMergeConflict
// Deprecated: ErrPassthrough is a deprecated alias of ErrorCodePassthrough.
ErrPassthrough=ErrorCodePassthrough
// Deprecated: ErrIterOver is a deprecated alias of ErrorCodeIterOver.
ErrIterOver=ErrorCodeIterOver
// Deprecated: ErrApplyFail is a deprecated alias of ErrorCodeApplyFail.
ErrApplyFail=ErrorCodeApplyFail
)
// index.go
// Deprecated: IndexAddOpts is a deprecated alias of IndexAddOption.
typeIndexAddOpts=IndexAddOption
// Deprecated: IndexStageOpts is a deprecated alias of IndexStageState.
typeIndexStageOpts=IndexStageState
// submodule.go
// Deprecated: SubmoduleCbk is a deprecated alias of SubmoduleCallback.
typeSubmoduleCbk=SubmoduleCallback
// Deprecated: SubmoduleVisitor is not used.
funcSubmoduleVisitor(csub unsafe.Pointer, name*C.char, handle unsafe.Pointer) C.int {
sub:=&Submodule{ptr: (*C.git_submodule)(csub)}
callback, ok:=pointerHandles.Get(handle).(SubmoduleCallback)
if!ok {
panic("invalid submodule visitor callback")
}
err:=callback(sub, C.GoString(name))
iferr!=nil {
returnC.int(ErrorCodeUser)
}
returnC.int(ErrorCodeOK)
}
// reference.go
// Deprecated: ReferenceIsValidName is a deprecated alias of ReferenceNameIsValid.
funcReferenceIsValidName(namestring) bool {
valid, _:=ReferenceNameIsValid(name)
returnvalid
}
// remote.go
// Deprecated: RemoteIsValidName is a deprecated alias of RemoteNameIsValid.
funcRemoteIsValidName(namestring) bool {
valid, _:=RemoteNameIsValid(name)
returnvalid
}
// tree.go
// Deprecated: CallbackGitTreeWalk is not used.
funcCallbackGitTreeWalk(_root*C.char, entry*C.git_tree_entry, ptr unsafe.Pointer) C.int {
root:=C.GoString(_root)
callback, ok:=pointerHandles.Get(ptr).(TreeWalkCallback)
if!ok {
panic("invalid treewalk callback")
}
err:=callback(root, newTreeEntry(entry))
iferr!=nil {
returnC.int(ErrorCodeUser)
}
returnC.int(ErrorCodeOK)
}