Prepare for the v1.2.0 release (#796) (#799)

This change adds a few more deprecation messages just before we remove
them.

(cherry picked from commit 2077003fa5)
This commit is contained in:
lhchavez 2021-09-04 14:37:03 -07:00 committed by GitHub
parent 0c87b5a542
commit 13670e24c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 118 additions and 63 deletions

View File

@ -13,10 +13,10 @@ import (
// blob.go // blob.go
// BlobChunkCallback is not used. // Deprecated: BlobChunkCallback is not used.
type BlobChunkCallback func(maxLen int) ([]byte, error) type BlobChunkCallback func(maxLen int) ([]byte, error)
// BlobCallbackData is not used. // Deprecated: BlobCallbackData is not used.
type BlobCallbackData struct { type BlobCallbackData struct {
Callback BlobChunkCallback Callback BlobChunkCallback
Error error Error error
@ -24,7 +24,7 @@ type BlobCallbackData struct {
// checkout.go // checkout.go
// CheckoutOpts is a deprecated alias of CheckoutOptions. // Deprecated: CheckoutOpts is a deprecated alias of CheckoutOptions.
type CheckoutOpts = CheckoutOptions type CheckoutOpts = CheckoutOptions
// diff.go // diff.go
@ -37,90 +37,145 @@ const (
// features.go // features.go
const ( const (
// FeatureHttps is a deprecated alias of FeatureHTTPS. // Deprecated: FeatureHttps is a deprecated alias of FeatureHTTPS.
FeatureHttps = FeatureHTTPS FeatureHttps = FeatureHTTPS
// FeatureSsh is a deprecated alias of FeatureSSH. // Deprecated: FeatureSsh is a deprecated alias of FeatureSSH.
FeatureSsh = FeatureSSH FeatureSsh = FeatureSSH
) )
// git.go // git.go
const ( const (
// Deprecated: ErrClassNone is a deprecated alias of ErrorClassNone.
ErrClassNone = ErrorClassNone ErrClassNone = ErrorClassNone
// Deprecated: ErrClassNoMemory is a deprecated alias of ErrorClassNoMemory.
ErrClassNoMemory = ErrorClassNoMemory ErrClassNoMemory = ErrorClassNoMemory
// Deprecated: ErrClassOs is a deprecated alias of ErrorClassOS.
ErrClassOs = ErrorClassOS ErrClassOs = ErrorClassOS
// Deprecated: ErrClassInvalid is a deprecated alias of ErrorClassInvalid.
ErrClassInvalid = ErrorClassInvalid ErrClassInvalid = ErrorClassInvalid
// Deprecated: ErrClassReference is a deprecated alias of ErrorClassReference.
ErrClassReference = ErrorClassReference ErrClassReference = ErrorClassReference
// Deprecated: ErrClassZlib is a deprecated alias of ErrorClassZlib.
ErrClassZlib = ErrorClassZlib ErrClassZlib = ErrorClassZlib
// Deprecated: ErrClassRepository is a deprecated alias of ErrorClassRepository.
ErrClassRepository = ErrorClassRepository ErrClassRepository = ErrorClassRepository
// Deprecated: ErrClassConfig is a deprecated alias of ErrorClassConfig.
ErrClassConfig = ErrorClassConfig ErrClassConfig = ErrorClassConfig
// Deprecated: ErrClassRegex is a deprecated alias of ErrorClassRegex.
ErrClassRegex = ErrorClassRegex ErrClassRegex = ErrorClassRegex
// Deprecated: ErrClassOdb is a deprecated alias of ErrorClassOdb.
ErrClassOdb = ErrorClassOdb ErrClassOdb = ErrorClassOdb
// Deprecated: ErrClassIndex is a deprecated alias of ErrorClassIndex.
ErrClassIndex = ErrorClassIndex ErrClassIndex = ErrorClassIndex
// Deprecated: ErrClassObject is a deprecated alias of ErrorClassObject.
ErrClassObject = ErrorClassObject ErrClassObject = ErrorClassObject
// Deprecated: ErrClassNet is a deprecated alias of ErrorClassNet.
ErrClassNet = ErrorClassNet ErrClassNet = ErrorClassNet
// Deprecated: ErrClassTag is a deprecated alias of ErrorClassTag.
ErrClassTag = ErrorClassTag ErrClassTag = ErrorClassTag
// Deprecated: ErrClassTree is a deprecated alias of ErrorClassTree.
ErrClassTree = ErrorClassTree ErrClassTree = ErrorClassTree
// Deprecated: ErrClassIndexer is a deprecated alias of ErrorClassIndexer.
ErrClassIndexer = ErrorClassIndexer ErrClassIndexer = ErrorClassIndexer
// Deprecated: ErrClassSSL is a deprecated alias of ErrorClassSSL.
ErrClassSSL = ErrorClassSSL ErrClassSSL = ErrorClassSSL
// Deprecated: ErrClassSubmodule is a deprecated alias of ErrorClassSubmodule.
ErrClassSubmodule = ErrorClassSubmodule ErrClassSubmodule = ErrorClassSubmodule
// Deprecated: ErrClassThread is a deprecated alias of ErrorClassThread.
ErrClassThread = ErrorClassThread ErrClassThread = ErrorClassThread
// Deprecated: ErrClassStash is a deprecated alias of ErrorClassStash.
ErrClassStash = ErrorClassStash ErrClassStash = ErrorClassStash
// Deprecated: ErrClassCheckout is a deprecated alias of ErrorClassCheckout.
ErrClassCheckout = ErrorClassCheckout ErrClassCheckout = ErrorClassCheckout
// Deprecated: ErrClassFetchHead is a deprecated alias of ErrorClassFetchHead.
ErrClassFetchHead = ErrorClassFetchHead ErrClassFetchHead = ErrorClassFetchHead
// Deprecated: ErrClassMerge is a deprecated alias of ErrorClassMerge.
ErrClassMerge = ErrorClassMerge ErrClassMerge = ErrorClassMerge
// Deprecated: ErrClassSsh is a deprecated alias of ErrorClassSSH.
ErrClassSsh = ErrorClassSSH ErrClassSsh = ErrorClassSSH
// Deprecated: ErrClassFilter is a deprecated alias of ErrorClassFilter.
ErrClassFilter = ErrorClassFilter ErrClassFilter = ErrorClassFilter
// Deprecated: ErrClassRevert is a deprecated alias of ErrorClassRevert.
ErrClassRevert = ErrorClassRevert ErrClassRevert = ErrorClassRevert
// Deprecated: ErrClassCallback is a deprecated alias of ErrorClassCallback.
ErrClassCallback = ErrorClassCallback ErrClassCallback = ErrorClassCallback
// Deprecated: ErrClassRebase is a deprecated alias of ErrorClassRebase.
ErrClassRebase = ErrorClassRebase ErrClassRebase = ErrorClassRebase
// Deprecated: ErrClassPatch is a deprecated alias of ErrorClassPatch.
ErrClassPatch = ErrorClassPatch ErrClassPatch = ErrorClassPatch
) )
const ( const (
// Deprecated: ErrOk is a deprecated alias of ErrorCodeOK.
ErrOk = ErrorCodeOK ErrOk = ErrorCodeOK
// Deprecated: ErrGeneric is a deprecated alias of ErrorCodeGeneric.
ErrGeneric = ErrorCodeGeneric ErrGeneric = ErrorCodeGeneric
// Deprecated: ErrNotFound is a deprecated alias of ErrorCodeNotFound.
ErrNotFound = ErrorCodeNotFound ErrNotFound = ErrorCodeNotFound
// Deprecated: ErrExists is a deprecated alias of ErrorCodeExists.
ErrExists = ErrorCodeExists ErrExists = ErrorCodeExists
// Deprecated: ErrAmbiguous is a deprecated alias of ErrorCodeAmbiguous.
ErrAmbiguous = ErrorCodeAmbiguous ErrAmbiguous = ErrorCodeAmbiguous
// Deprecated: ErrAmbigious is a deprecated alias of ErrorCodeAmbiguous.
ErrAmbigious = ErrorCodeAmbiguous ErrAmbigious = ErrorCodeAmbiguous
// Deprecated: ErrBuffs is a deprecated alias of ErrorCodeBuffs.
ErrBuffs = ErrorCodeBuffs ErrBuffs = ErrorCodeBuffs
// Deprecated: ErrUser is a deprecated alias of ErrorCodeUser.
ErrUser = ErrorCodeUser ErrUser = ErrorCodeUser
// Deprecated: ErrBareRepo is a deprecated alias of ErrorCodeBareRepo.
ErrBareRepo = ErrorCodeBareRepo ErrBareRepo = ErrorCodeBareRepo
// Deprecated: ErrUnbornBranch is a deprecated alias of ErrorCodeUnbornBranch.
ErrUnbornBranch = ErrorCodeUnbornBranch ErrUnbornBranch = ErrorCodeUnbornBranch
// Deprecated: ErrUnmerged is a deprecated alias of ErrorCodeUnmerged.
ErrUnmerged = ErrorCodeUnmerged ErrUnmerged = ErrorCodeUnmerged
// Deprecated: ErrNonFastForward is a deprecated alias of ErrorCodeNonFastForward.
ErrNonFastForward = ErrorCodeNonFastForward ErrNonFastForward = ErrorCodeNonFastForward
// Deprecated: ErrInvalidSpec is a deprecated alias of ErrorCodeInvalidSpec.
ErrInvalidSpec = ErrorCodeInvalidSpec ErrInvalidSpec = ErrorCodeInvalidSpec
// Deprecated: ErrConflict is a deprecated alias of ErrorCodeConflict.
ErrConflict = ErrorCodeConflict ErrConflict = ErrorCodeConflict
// Deprecated: ErrLocked is a deprecated alias of ErrorCodeLocked.
ErrLocked = ErrorCodeLocked ErrLocked = ErrorCodeLocked
// Deprecated: ErrModified is a deprecated alias of ErrorCodeModified.
ErrModified = ErrorCodeModified ErrModified = ErrorCodeModified
// Deprecated: ErrAuth is a deprecated alias of ErrorCodeAuth.
ErrAuth = ErrorCodeAuth ErrAuth = ErrorCodeAuth
// Deprecated: ErrCertificate is a deprecated alias of ErrorCodeCertificate.
ErrCertificate = ErrorCodeCertificate ErrCertificate = ErrorCodeCertificate
// Deprecated: ErrApplied is a deprecated alias of ErrorCodeApplied.
ErrApplied = ErrorCodeApplied ErrApplied = ErrorCodeApplied
// Deprecated: ErrPeel is a deprecated alias of ErrorCodePeel.
ErrPeel = ErrorCodePeel ErrPeel = ErrorCodePeel
// Deprecated: ErrEOF is a deprecated alias of ErrorCodeEOF.
ErrEOF = ErrorCodeEOF ErrEOF = ErrorCodeEOF
// Deprecated: ErrUncommitted is a deprecated alias of ErrorCodeUncommitted.
ErrUncommitted = ErrorCodeUncommitted ErrUncommitted = ErrorCodeUncommitted
// Deprecated: ErrDirectory is a deprecated alias of ErrorCodeDirectory.
ErrDirectory = ErrorCodeDirectory ErrDirectory = ErrorCodeDirectory
// Deprecated: ErrMergeConflict is a deprecated alias of ErrorCodeMergeConflict.
ErrMergeConflict = ErrorCodeMergeConflict ErrMergeConflict = ErrorCodeMergeConflict
// Deprecated: ErrPassthrough is a deprecated alias of ErrorCodePassthrough.
ErrPassthrough = ErrorCodePassthrough ErrPassthrough = ErrorCodePassthrough
// Deprecated: ErrIterOver is a deprecated alias of ErrorCodeIterOver.
ErrIterOver = ErrorCodeIterOver ErrIterOver = ErrorCodeIterOver
) )
// index.go // index.go
// IndexAddOpts is a deprecated alias of IndexAddOption. // Deprecated: IndexAddOpts is a deprecated alias of IndexAddOption.
type IndexAddOpts = IndexAddOption type IndexAddOpts = IndexAddOption
// IndexStageOpts is a deprecated alias of IndexStageState. // Deprecated: IndexStageOpts is a deprecated alias of IndexStageState.
type IndexStageOpts = IndexStageState type IndexStageOpts = IndexStageState
// submodule.go // submodule.go
// SubmoduleCbk is a deprecated alias of SubmoduleCallback. // Deprecated: SubmoduleCbk is a deprecated alias of SubmoduleCallback.
type SubmoduleCbk = SubmoduleCallback type SubmoduleCbk = SubmoduleCallback
// SubmoduleVisitor is not used. // Deprecated: SubmoduleVisitor is not used.
func SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer) C.int { func SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer) C.int {
sub := &Submodule{(*C.git_submodule)(csub), nil} sub := &Submodule{(*C.git_submodule)(csub), nil}
@ -133,7 +188,7 @@ func SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer)
// tree.go // tree.go
// CallbackGitTreeWalk is not used. // Deprecated: CallbackGitTreeWalk is not used.
func CallbackGitTreeWalk(_root *C.char, entry *C.git_tree_entry, ptr unsafe.Pointer) C.int { func CallbackGitTreeWalk(_root *C.char, entry *C.git_tree_entry, ptr unsafe.Pointer) C.int {
root := C.GoString(_root) root := C.GoString(_root)