Skip to content

Commit 7f97ba4

Browse files
committed
Fix lint
1 parent 3a74184 commit 7f97ba4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

models/git/branch_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
func TestAddDeletedBranch(t *testing.T) {
2121
assert.NoError(t, unittest.PrepareTestDatabase())
2222
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
23+
assert.EqualValues(t, "sha1", repo.ObjectFormatName)
2324
firstBranch := unittest.AssertExistsAndLoadBean(t, &git_model.Branch{ID: 1})
2425

2526
assert.True(t, firstBranch.IsDeleted)

modules/git/object_format.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (Sha1ObjectFormatImpl) IsValid(objIDStr string) bool {
5454
func (h Sha1ObjectFormatImpl) NewIDFromString(objIDStr string) (ObjectID, error) {
5555
objIDStr = strings.TrimSpace(objIDStr)
5656
if len(objIDStr) != h.FullLength() {
57-
return h.EmptyObjectID(), fmt.Errorf("length must be %d: %s", h.FullLength(), s)
57+
return h.EmptyObjectID(), fmt.Errorf("length must be %d: %s", h.FullLength(), objIDStr)
5858
}
5959
b, err := hex.DecodeString(objIDStr)
6060
if err != nil {

0 commit comments

Comments
 (0)