diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-22 13:17:55 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-22 13:32:35 +0800 |
commit | 7a6f71ac73b41a38e9982bea3d46a87c327bd77a (patch) | |
tree | 92d5b637f57080af40c2f42834282df58a4e21a3 /http_handle_repo_index.go | |
parent | fedauth: Use NewRequestWithContext (diff) | |
download | forge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.tar.gz forge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.tar.zst forge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.zip |
Initial linting
Diffstat (limited to 'http_handle_repo_index.go')
-rw-r--r-- | http_handle_repo_index.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/http_handle_repo_index.go b/http_handle_repo_index.go index a22c75f..df1ee5e 100644 --- a/http_handle_repo_index.go +++ b/http_handle_repo_index.go @@ -14,7 +14,7 @@ import ( "github.com/go-git/go-git/v5/plumbing/storer" ) -func httpHandleRepoIndex(w http.ResponseWriter, r *http.Request, params map[string]any) { +func httpHandleRepoIndex(w http.ResponseWriter, _ *http.Request, params map[string]any) { var repo *git.Repository var repoName string var groupPath []string @@ -27,6 +27,7 @@ func httpHandleRepoIndex(w http.ResponseWriter, r *http.Request, params map[stri var notes []string var branches []string var branchesIter storer.ReferenceIter + var logOptions git.LogOptions repo, repoName, groupPath = params["repo"].(*git.Repository), params["repo_name"].(string), params["group_path"].([]string) @@ -48,7 +49,8 @@ func httpHandleRepoIndex(w http.ResponseWriter, r *http.Request, params map[stri } params["branches"] = branches - if commitIter, err = repo.Log(&git.LogOptions{From: refHash}); err != nil { + logOptions = git.LogOptions{From: refHash} //exhaustruct:ignore + if commitIter, err = repo.Log(&logOptions); err != nil { goto no_ref } commitIterSeq, params["commits_err"] = commitIterSeqErr(commitIter) |