diff options
| author | lhchavez <[email protected]> | 2020-12-05 07:23:44 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-12-05 07:23:44 -0800 |
| commit | 137c05e802d5e11a5ab54809bc8be8f61ccece21 (patch) | |
| tree | b44997824565f9506744a4259177746b83112e92 /object_test.go | |
| parent | 1fabe95fb7275df980ff6ab03fb85eac91c5849d (diff) | |
Mark some symbols to be deprecated #minor (#698)
This change introduces the file deprecated.go, which contains any
constants, functions, and types that are slated to be deprecated in the
next major release.
These symbols are deprecated because they refer to old spellings in
pre-1.0 libgit2. This also makes the build be done with the
`-DDEPRECATE_HARD` flag to avoid regressions.
This, together with
[gorelease](https://godoc.org/golang.org/x/exp/cmd/gorelease)[1] should
make releases safer going forward.
1: More information about how that works at
https://go.googlesource.com/exp/+/refs/heads/master/apidiff/README.md
Diffstat (limited to 'object_test.go')
| -rw-r--r-- | object_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/object_test.go b/object_test.go index 4932dd2..3b602b8 100644 --- a/object_test.go +++ b/object_test.go @@ -153,8 +153,8 @@ func TestObjectPeel(t *testing.T) { obj, err = commit.Peel(ObjectTag) - if !IsErrorCode(err, ErrInvalidSpec) { - t.Fatalf("Wrong error when peeling a commit to a tag, expected ErrInvalidSpec, have %v", err) + if !IsErrorCode(err, ErrorCodeInvalidSpec) { + t.Fatalf("Wrong error when peeling a commit to a tag, expected ErrorCodeInvalidSpec, have %v", err) } tree, err := repo.LookupTree(treeID) @@ -162,8 +162,8 @@ func TestObjectPeel(t *testing.T) { obj, err = tree.Peel(ObjectAny) - if !IsErrorCode(err, ErrInvalidSpec) { - t.Fatalf("Wrong error when peeling a tree, expected ErrInvalidSpec, have %v", err) + if !IsErrorCode(err, ErrorCodeInvalidSpec) { + t.Fatalf("Wrong error when peeling a tree, expected ErrorCodeInvalidSpec, have %v", err) } entry := tree.EntryByName("README") @@ -173,8 +173,8 @@ func TestObjectPeel(t *testing.T) { obj, err = blob.Peel(ObjectAny) - if !IsErrorCode(err, ErrInvalidSpec) { - t.Fatalf("Wrong error when peeling a blob, expected ErrInvalidSpec, have %v", err) + if !IsErrorCode(err, ErrorCodeInvalidSpec) { + t.Fatalf("Wrong error when peeling a blob, expected ErrorCodeInvalidSpec, have %v", err) } tagID := createTestTag(t, repo, commit) |
