8000 Fix some lint warning and increase stalebot to 180 days by pjbgf · Pull Request #1128 · go-git/go-git · GitHub
[go: up one dir, main page]

Skip to content

Fix some lint warning and increase stalebot to 180 days #1128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading < 8000 /span>
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
*: Small fixes to remove linter warnings
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
  • Loading branch information
pjbgf committed Jun 28, 2024
commit f61638f24a924c48606977e38920eac07c7251e2
1 change: 0 additions & 1 deletion plumbing/format/index/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ func (d *Decoder) readExtensions(idx *Index) error {
peeked, err = d.buf.Peek(peekLen)
if len(peeked) < peekLen {
// there can't be an extension at this point, so let's bail out
err = nil
break
}
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ func (r *Repository) setIsBare(isBare bool) error {
return r.Storer.SetConfig(cfg)
}

func (r *Repository) updateRemoteConfigIfNeeded(o *CloneOptions, c *config.RemoteConfig, head *plumbing.Reference) error {
func (r *Repository) updateRemoteConfigIfNeeded(o *CloneOptions, c *config.RemoteConfig, _ *plumbing.Reference) error {
if !o.SingleBranch {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions storage/filesystem/dotgit/dotgit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ func (s *SuiteDotGit) TestObjectsExclusive(c *C) {
testObjectsWithPrefix(c, fs, dir)
}

func testObjects(c *C, fs billy.Filesystem, dir *DotGit) {
func testObjects(c *C, _ billy.Filesystem, dir *DotGit) {
hashes, err := dir.Objects()
c.Assert(err, IsNil)
c.Assert(hashes, HasLen, 187)
Expand All @@ -620,7 +620,7 @@ func testObjects(c *C, fs billy.Filesystem, dir *DotGit) {
c.Assert(hashes[2].String(), Equals, "03db8e1fbe133a480f2867aac478fd866686d69e")
}

func testObjectsWithPrefix(c *C, fs billy.Filesystem, dir *DotGit) {
func testObjectsWithPrefix(c *C, _ billy.Filesystem, dir *DotGit) {
prefix, _ := hex.DecodeString("01d5")
hashes, err := dir.ObjectsWithPrefix(prefix)
c.Assert(err, IsNil)
Expand Down
3 changes: 2 additions & 1 deletion worktree_linux.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package git
Expand All @@ -21,6 +22,6 @@ func init() {
}
}

func isSymlinkWindowsNonAdmin(err error) bool {
func isSymlinkWindowsNonAdmin(_ error) bool {
return false
}
4 changes: 2 additions & 2 deletions worktree_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func (w *Worktree) copyFileToStorage(path string) (hash plumbing.Hash, err error
return w.r.Storer.SetEncodedObject(obj)
}

func (w *Worktree) fillEncodedObjectFromFile(dst io.Writer, path string, fi os.FileInfo) (err error) {
func (w *Worktree) fillEncodedObjectFromFile(dst io.Writer, path string, _ os.FileInfo) (err error) {
src, err := w.Filesystem.Open(path)
if err != nil {
return err
Expand All @@ -503,7 +503,7 @@ func (w *Worktree) fillEncodedObjectFromFile(dst io.Writer, path string, fi os.F
return err
}

func (w *Worktree) fillEncodedObjectFromSymlink(dst io.Writer, path string, fi os.FileInfo) error {
func (w *Worktree) fillEncodedObjectFromSymlink(dst io.Writer, path string, _ os.FileInfo) error {
target, err := w.Filesystem.Readlink(path)
if err != nil {
return err
Expand Down
0