Skip to content

Commit 2077003

Browse files
authored
Prepare for the v1.2.0 release (#796)
This change adds a few more deprecation messages just before we remove them.
1 parent d452476 commit 2077003

File tree

2 files changed

+131
-75
lines changed

2 files changed

+131
-75
lines changed

deprecated.go

Lines changed: 128 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ import (
1313

1414
// blob.go
1515

16-
// BlobChunkCallback is not used.
16+
// Deprecated: BlobChunkCallback is not used.
1717
type BlobChunkCallback func(maxLen int) ([]byte, error)
1818

19-
// BlobCallbackData is not used.
19+
// Deprecated: BlobCallbackData is not used.
2020
type BlobCallbackData struct {
2121
Callback BlobChunkCallback
2222
Error error
2323
}
2424

2525
// checkout.go
2626

27-
// CheckoutOpts is a deprecated alias of CheckoutOptions.
27+
// Deprecated: CheckoutOpts is a deprecated alias of CheckoutOptions.
2828
type CheckoutOpts = CheckoutOptions
2929

3030
// credentials.go
3131

32-
// CredType is a deprecated alias of CredentialType
32+
// Deprecated: CredType is a deprecated alias of CredentialType
3333
type CredType = CredentialType
3434

3535
const (
@@ -39,35 +39,35 @@ const (
3939
CredTypeDefault = CredentialTypeDefault
4040
)
4141

42-
// Cred is a deprecated alias of Credential
42+
// Deprecated: Cred is a deprecated alias of Credential
4343
type Cred = Credential
4444

45-
// NewCredUsername is a deprecated alias of NewCredentialUsername.
45+
// Deprecated: NewCredUsername is a deprecated alias of NewCredentialUsername.
4646
func NewCredUsername(username string) (*Cred, error) {
4747
return NewCredentialUsername(username)
4848
}
4949

50-
// NewCredUserpassPlaintext is a deprecated alias of NewCredentialUserpassPlaintext.
50+
// Deprecated: NewCredUserpassPlaintext is a deprecated alias of NewCredentialUserpassPlaintext.
5151
func NewCredUserpassPlaintext(username string, password string) (*Cred, error) {
5252
return NewCredentialUserpassPlaintext(username, password)
5353
}
5454

55-
// NewCredSshKey is a deprecated alias of NewCredentialSshKey.
55+
// Deprecated: NewCredSshKey is a deprecated alias of NewCredentialSshKey.
5656
func NewCredSshKey(username string, publicKeyPath string, privateKeyPath string, passphrase string) (*Cred, error) {
5757
return NewCredentialSSHKey(username, publicKeyPath, privateKeyPath, passphrase)
5858
}
5959

60-
// NewCredSshKeyFromMemory is a deprecated alias of NewCredentialSSHKeyFromMemory.
60+
// Deprecated: NewCredSshKeyFromMemory is a deprecated alias of NewCredentialSSHKeyFromMemory.
6161
func NewCredSshKeyFromMemory(username string, publicKey string, privateKey string, passphrase string) (*Cred, error) {
6262
return NewCredentialSSHKeyFromMemory(username, publicKey, privateKey, passphrase)
6363
}
6464

65-
// NewCredSshKeyFromAgent is a deprecated alias of NewCredentialSSHFromAgent.
65+
// Deprecated: NewCredSshKeyFromAgent is a deprecated alias of NewCredentialSSHFromAgent.
6666
func NewCredSshKeyFromAgent(username string) (*Cred, error) {
6767
return NewCredentialSSHKeyFromAgent(username)
6868
}
6969

70-
// NewCredDefault is a deprecated alias fof NewCredentialDefault.
70+
// Deprecated: NewCredDefault is a deprecated alias fof NewCredentialDefault.
7171
func NewCredDefault() (*Cred, error) {
7272
return NewCredentialDefault()
7373
}
@@ -82,91 +82,147 @@ const (
8282
// features.go
8383

8484
const (
85-
// FeatureHttps is a deprecated alias of FeatureHTTPS.
85+
// Deprecated: FeatureHttps is a deprecated alias of FeatureHTTPS.
8686
FeatureHttps = FeatureHTTPS
8787

88-
// FeatureSsh is a deprecated alias of FeatureSSH.
88+
// Deprecated: FeatureSsh is a deprecated alias of FeatureSSH.
8989
FeatureSsh = FeatureSSH
9090
)
9191

9292
// git.go
9393

9494
const (
95-
ErrClassNone = ErrorClassNone
96-
ErrClassNoMemory = ErrorClassNoMemory
97-
ErrClassOs = ErrorClassOS
98-
ErrClassInvalid = ErrorClassInvalid
99-
ErrClassReference = ErrorClassReference
100-
ErrClassZlib = ErrorClassZlib
95+
// Deprecated: ErrClassNone is a deprecated alias of ErrorClassNone.
96+
ErrClassNone = ErrorClassNone
97+
// Deprecated: ErrClassNoMemory is a deprecated alias of ErrorClassNoMemory.
98+
ErrClassNoMemory = ErrorClassNoMemory
99+
// Deprecated: ErrClassOs is a deprecated alias of ErrorClassOS.
100+
ErrClassOs = ErrorClassOS
101+
// Deprecated: ErrClassInvalid is a deprecated alias of ErrorClassInvalid.
102+
ErrClassInvalid = ErrorClassInvalid
103+
// Deprecated: ErrClassReference is a deprecated alias of ErrorClassReference.
104+
ErrClassReference = ErrorClassReference
105+
// Deprecated: ErrClassZlib is a deprecated alias of ErrorClassZlib.
106+
ErrClassZlib = ErrorClassZlib
107+
// Deprecated: ErrClassRepository is a deprecated alias of ErrorClassRepository.
101108
ErrClassRepository = ErrorClassRepository
102-
ErrClassConfig = ErrorClassConfig
103-
ErrClassRegex = ErrorClassRegex
104-
ErrClassOdb = ErrorClassOdb
105-
ErrClassIndex = ErrorClassIndex
106-
ErrClassObject = ErrorClassObject
107-
ErrClassNet = ErrorClassNet
108-
ErrClassTag = ErrorClassTag
109-
ErrClassTree = ErrorClassTree
110-
ErrClassIndexer = ErrorClassIndexer
111-
ErrClassSSL = ErrorClassSSL
112-
ErrClassSubmodule = ErrorClassSubmodule
113-
ErrClassThread = ErrorClassThread
114-
ErrClassStash = ErrorClassStash
115-
ErrClassCheckout = ErrorClassCheckout
116-
ErrClassFetchHead = ErrorClassFetchHead
117-
ErrClassMerge = ErrorClassMerge
118-
ErrClassSsh = ErrorClassSSH
119-
ErrClassFilter = ErrorClassFilter
120-
ErrClassRevert = ErrorClassRevert
121-
ErrClassCallback = ErrorClassCallback
122-
ErrClassRebase = ErrorClassRebase
123-
ErrClassPatch = ErrorClassPatch
109+
// Deprecated: ErrClassConfig is a deprecated alias of ErrorClassConfig.
110+
ErrClassConfig = ErrorClassConfig
111+
// Deprecated: ErrClassRegex is a deprecated alias of ErrorClassRegex.
112+
ErrClassRegex = ErrorClassRegex
113+
// Deprecated: ErrClassOdb is a deprecated alias of ErrorClassOdb.
114+
ErrClassOdb = ErrorClassOdb
115+
// Deprecated: ErrClassIndex is a deprecated alias of ErrorClassIndex.
116+
ErrClassIndex = ErrorClassIndex
117+
// Deprecated: ErrClassObject is a deprecated alias of ErrorClassObject.
118+
ErrClassObject = ErrorClassObject
119+
// Deprecated: ErrClassNet is a deprecated alias of ErrorClassNet.
120+
ErrClassNet = ErrorClassNet
121+
// Deprecated: ErrClassTag is a deprecated alias of ErrorClassTag.
122+
ErrClassTag = ErrorClassTag
123+
// Deprecated: ErrClassTree is a deprecated alias of ErrorClassTree.
124+
ErrClassTree = ErrorClassTree
125+
// Deprecated: ErrClassIndexer is a deprecated alias of ErrorClassIndexer.
126+
ErrClassIndexer = ErrorClassIndexer
127+
// Deprecated: ErrClassSSL is a deprecated alias of ErrorClassSSL.
128+
ErrClassSSL = ErrorClassSSL
129+
// Deprecated: ErrClassSubmodule is a deprecated alias of ErrorClassSubmodule.
130+
ErrClassSubmodule = ErrorClassSubmodule
131+
// Deprecated: ErrClassThread is a deprecated alias of ErrorClassThread.
132+
ErrClassThread = ErrorClassThread
133+
// Deprecated: ErrClassStash is a deprecated alias of ErrorClassStash.
134+
ErrClassStash = ErrorClassStash
135+
// Deprecated: ErrClassCheckout is a deprecated alias of ErrorClassCheckout.
136+
ErrClassCheckout = ErrorClassCheckout
137+
// Deprecated: ErrClassFetchHead is a deprecated alias of ErrorClassFetchHead.
138+
ErrClassFetchHead = ErrorClassFetchHead
139+
// Deprecated: ErrClassMerge is a deprecated alias of ErrorClassMerge.
140+
ErrClassMerge = ErrorClassMerge
141+
// Deprecated: ErrClassSsh is a deprecated alias of ErrorClassSSH.
142+
ErrClassSsh = ErrorClassSSH
143+
// Deprecated: ErrClassFilter is a deprecated alias of ErrorClassFilter.
144+
ErrClassFilter = ErrorClassFilter
145+
// Deprecated: ErrClassRevert is a deprecated alias of ErrorClassRevert.
146+
ErrClassRevert = ErrorClassRevert
147+
// Deprecated: ErrClassCallback is a deprecated alias of ErrorClassCallback.
148+
ErrClassCallback = ErrorClassCallback
149+
// Deprecated: ErrClassRebase is a deprecated alias of ErrorClassRebase.
150+
ErrClassRebase = ErrorClassRebase
151+
// Deprecated: ErrClassPatch is a deprecated alias of ErrorClassPatch.
152+
ErrClassPatch = ErrorClassPatch
124153
)
125154

126155
const (
127-
ErrOk = ErrorCodeOK
128-
ErrGeneric = ErrorCodeGeneric
129-
ErrNotFound = ErrorCodeNotFound
130-
ErrExists = ErrorCodeExists
131-
ErrAmbiguous = ErrorCodeAmbiguous
132-
ErrAmbigious = ErrorCodeAmbiguous
133-
ErrBuffs = ErrorCodeBuffs
134-
ErrUser = ErrorCodeUser
135-
ErrBareRepo = ErrorCodeBareRepo
136-
ErrUnbornBranch = ErrorCodeUnbornBranch
137-
ErrUnmerged = ErrorCodeUnmerged
156+
// Deprecated: ErrOk is a deprecated alias of ErrorCodeOK.
157+
ErrOk = ErrorCodeOK
158+
// Deprecated: ErrGeneric is a deprecated alias of ErrorCodeGeneric.
159+
ErrGeneric = ErrorCodeGeneric
160+
// Deprecated: ErrNotFound is a deprecated alias of ErrorCodeNotFound.
161+
ErrNotFound = ErrorCodeNotFound
162+
// Deprecated: ErrExists is a deprecated alias of ErrorCodeExists.
163+
ErrExists = ErrorCodeExists
164+
// Deprecated: ErrAmbiguous is a deprecated alias of ErrorCodeAmbiguous.
165+
ErrAmbiguous = ErrorCodeAmbiguous
166+
// Deprecated: ErrAmbigious is a deprecated alias of ErrorCodeAmbiguous.
167+
ErrAmbigious = ErrorCodeAmbiguous
168+
// Deprecated: ErrBuffs is a deprecated alias of ErrorCodeBuffs.
169+
ErrBuffs = ErrorCodeBuffs
170+
// Deprecated: ErrUser is a deprecated alias of ErrorCodeUser.
171+
ErrUser = ErrorCodeUser
172+
// Deprecated: ErrBareRepo is a deprecated alias of ErrorCodeBareRepo.
173+
ErrBareRepo = ErrorCodeBareRepo
174+
// Deprecated: ErrUnbornBranch is a deprecated alias of ErrorCodeUnbornBranch.
175+
ErrUnbornBranch = ErrorCodeUnbornBranch
176+
// Deprecated: ErrUnmerged is a deprecated alias of ErrorCodeUnmerged.
177+
ErrUnmerged = ErrorCodeUnmerged
178+
// Deprecated: ErrNonFastForward is a deprecated alias of ErrorCodeNonFastForward.
138179
ErrNonFastForward = ErrorCodeNonFastForward
139-
ErrInvalidSpec = ErrorCodeInvalidSpec
140-
ErrConflict = ErrorCodeConflict
141-
ErrLocked = ErrorCodeLocked
142-
ErrModified = ErrorCodeModified
143-
ErrAuth = ErrorCodeAuth
144-
ErrCertificate = ErrorCodeCertificate
145-
ErrApplied = ErrorCodeApplied
146-
ErrPeel = ErrorCodePeel
147-
ErrEOF = ErrorCodeEOF
148-
ErrUncommitted = ErrorCodeUncommitted
149-
ErrDirectory = ErrorCodeDirectory
150-
ErrMergeConflict = ErrorCodeMergeConflict
151-
ErrPassthrough = ErrorCodePassthrough
152-
ErrIterOver = ErrorCodeIterOver
153-
ErrApplyFail = ErrorCodeApplyFail
180+
// Deprecated: ErrInvalidSpec is a deprecated alias of ErrorCodeInvalidSpec.
181+
ErrInvalidSpec = ErrorCodeInvalidSpec
182+
// Deprecated: ErrConflict is a deprecated alias of ErrorCodeConflict.
183+
ErrConflict = ErrorCodeConflict
184+
// Deprecated: ErrLocked is a deprecated alias of ErrorCodeLocked.
185+
ErrLocked = ErrorCodeLocked
186+
// Deprecated: ErrModified is a deprecated alias of ErrorCodeModified.
187+
ErrModified = ErrorCodeModified
188+
// Deprecated: ErrAuth is a deprecated alias of ErrorCodeAuth.
189+
ErrAuth = ErrorCodeAuth
190+
// Deprecated: ErrCertificate is a deprecated alias of ErrorCodeCertificate.
191+
ErrCertificate = ErrorCodeCertificate
192+
// Deprecated: ErrApplied is a deprecated alias of ErrorCodeApplied.
193+
ErrApplied = ErrorCodeApplied
194+
// Deprecated: ErrPeel is a deprecated alias of ErrorCodePeel.
195+
ErrPeel = ErrorCodePeel
196+
// Deprecated: ErrEOF is a deprecated alias of ErrorCodeEOF.
197+
ErrEOF = ErrorCodeEOF
198+
// Deprecated: ErrUncommitted is a deprecated alias of ErrorCodeUncommitted.
199+
ErrUncommitted = ErrorCodeUncommitted
200+
// Deprecated: ErrDirectory is a deprecated alias of ErrorCodeDirectory.
201+
ErrDirectory = ErrorCodeDirectory
202+
// Deprecated: ErrMergeConflict is a deprecated alias of ErrorCodeMergeConflict.
203+
ErrMergeConflict = ErrorCodeMergeConflict
204+
// Deprecated: ErrPassthrough is a deprecated alias of ErrorCodePassthrough.
205+
ErrPassthrough = ErrorCodePassthrough
206+
// Deprecated: ErrIterOver is a deprecated alias of ErrorCodeIterOver.
207+
ErrIterOver = ErrorCodeIterOver
208+
// Deprecated: ErrApplyFail is a deprecated alias of ErrorCodeApplyFail.
209+
ErrApplyFail = ErrorCodeApplyFail
154210
)
155211

156212
// index.go
157213

158-
// IndexAddOpts is a deprecated alias of IndexAddOption.
214+
// Deprecated: IndexAddOpts is a deprecated alias of IndexAddOption.
159215
type IndexAddOpts = IndexAddOption
160216

161-
// IndexStageOpts is a deprecated alias of IndexStageState.
217+
// Deprecated: IndexStageOpts is a deprecated alias of IndexStageState.
162218
type IndexStageOpts = IndexStageState
163219

164220
// submodule.go
165221

166-
// SubmoduleCbk is a deprecated alias of SubmoduleCallback.
222+
// Deprecated: SubmoduleCbk is a deprecated alias of SubmoduleCallback.
167223
type SubmoduleCbk = SubmoduleCallback
168224

169-
// SubmoduleVisitor is not used.
225+
// Deprecated: SubmoduleVisitor is not used.
170226
func SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer) C.int {
171227
sub := &Submodule{(*C.git_submodule)(csub), nil}
172228

@@ -179,7 +235,7 @@ func SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer)
179235

180236
// tree.go
181237

182-
// CallbackGitTreeWalk is not used.
238+
// Deprecated: CallbackGitTreeWalk is not used.
183239
func CallbackGitTreeWalk(_root *C.char, entry *C.git_tree_entry, ptr unsafe.Pointer) C.int {
184240
root := C.GoString(_root)
185241

remote.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ const (
3030

3131
// RemoteCreateOptions contains options for creating a remote
3232
type RemoteCreateOptions struct {
33-
Name string
34-
FetchSpec string
35-
Flags RemoteCreateOptionsFlag
33+
Name string
34+
FetchSpec string
35+
Flags RemoteCreateOptionsFlag
3636
}
3737

3838
type TransferProgress struct {

0 commit comments

Comments
 (0)