]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modfetch: simplify a redundant condition
authorBryan C. Mills <bcmills@google.com>
Thu, 14 Dec 2023 19:26:20 +0000 (14:26 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 14 Dec 2023 19:59:55 +0000 (19:59 +0000)
commit7c282ba12a9078eefab1d6e1a42ca8a1ae723737
tree6c6924d096b2570d6c657e3ac06188e2a3f6d3c1
parent6aa482681ca72aa3b18d4491e6db1694ef1be6bc
cmd/go/internal/modfetch: simplify a redundant condition

In gitRepo.stat, we were checking ref != "" twice,
which confused me during casual reading because it made it seem like
the string could be empty when it actually never is.

For #56881.

Change-Id: Ib83303a149ea771399cb55fedd5dfa02ad411ff0
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/549855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modfetch/codehost/git.go