aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_commit_nogogit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_commit_nogogit.go')
-rw-r--r--modules/git/repo_commit_nogogit.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/git/repo_commit_nogogit.go b/modules/git/repo_commit_nogogit.go
index d86e7d3268..c8cd7ec882 100644
--- a/modules/git/repo_commit_nogogit.go
+++ b/modules/git/repo_commit_nogogit.go
@@ -37,7 +37,10 @@ func (repo *Repository) ResolveReference(name string) (string, error) {
func (repo *Repository) GetRefCommitID(name string) (string, error) {
wr, rd, cancel := repo.CatFileBatchCheck(repo.Ctx)
defer cancel()
- _, _ = wr.Write([]byte(name + "\n"))
+ _, err := wr.Write([]byte(name + "\n"))
+ if err != nil {
+ return "", err
+ }
shaBs, _, _, err := ReadBatchLine(rd)
if IsErrNotExist(err) {
return "", ErrNotExist{name, ""}