aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/stale-issues-bot.yaml2
-rw-r--r--plumbing/format/index/decoder.go1
-rw-r--r--repository.go2
-rw-r--r--storage/filesystem/dotgit/dotgit_test.go4
-rw-r--r--worktree_linux.go3
-rw-r--r--worktree_status.go4
6 files changed, 8 insertions, 8 deletions
diff --git a/.github/workflows/stale-issues-bot.yaml b/.github/workflows/stale-issues-bot.yaml
index 11b86ae..fe40db3 100644
--- a/.github/workflows/stale-issues-bot.yaml
+++ b/.github/workflows/stale-issues-bot.yaml
@@ -15,7 +15,7 @@ jobs:
with:
ascending: true
operations-per-run: 30
- days-before-stale: 90
+ days-before-stale: 180
days-before-close: 30
stale-issue-label: stale
stale-pr-label: stale
diff --git a/plumbing/format/index/decoder.go b/plumbing/format/index/decoder.go
index f43b1c5..fc25d37 100644
--- a/plumbing/format/index/decoder.go
+++ b/plumbing/format/index/decoder.go
@@ -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 {
diff --git a/repository.go b/repository.go
index a57c714..6d7e196 100644
--- a/repository.go
+++ b/repository.go
@@ -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
}
diff --git a/storage/filesystem/dotgit/dotgit_test.go b/storage/filesystem/dotgit/dotgit_test.go
index be66fee..fdb8a57 100644
--- a/storage/filesystem/dotgit/dotgit_test.go
+++ b/storage/filesystem/dotgit/dotgit_test.go
@@ -612,7 +612,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)
@@ -621,7 +621,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)
diff --git a/worktree_linux.go b/worktree_linux.go
index 6fcace2..f6b85fe 100644
--- a/worktree_linux.go
+++ b/worktree_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
// +build linux
package git
@@ -21,6 +22,6 @@ func init() {
}
}
-func isSymlinkWindowsNonAdmin(err error) bool {
+func isSymlinkWindowsNonAdmin(_ error) bool {
return false
}
diff --git a/worktree_status.go b/worktree_status.go
index f6b8282..6e72db9 100644
--- a/worktree_status.go
+++ b/worktree_status.go
@@ -504,7 +504,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
@@ -519,7 +519,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